nerdexam
Python_Institute

PCAP-31-03 · Question #114

A two-parameter lambda function raising its first parameter to the power of the second parameter should be declared as:

The correct answer is D. lambda x, y: x ** y. See the full explanation below for the reasoning.

Question

A two-parameter lambda function raising its first parameter to the power of the second parameter should be declared as:

Options

  • Alambda (x, y) = x ** y
  • Blambda (x, y): x ** y
  • Cdef lambda (x, y): return x ** y
  • Dlambda x, y: x ** y

How the community answered

(28 responses)
  • A
    4% (1)
  • B
    4% (1)
  • C
    11% (3)
  • D
    82% (23)

Community Discussion

No community discussion yet for this question.

Full PCAP-31-03 Practice