Python_Institute
PCAP-31-03 · Question #33
What is the expected output of the following code? def foo(x,y,z): return x(y) - x(z) print{f00(lambda x: x % 2, 2, 1) )
The correct answer is C. -1. See the full explanation below for the reasoning.
Question
What is the expected output of the following code? def foo(x,y,z):
return x(y) - x(z) print{f00(lambda x: x % 2, 2, 1) )
Options
- A1
- B0
- C-1
- Dan exception is raised
How the community answered
(43 responses)- A12% (5)
- B2% (1)
- C79% (34)
- D7% (3)
Community Discussion
No community discussion yet for this question.