← Quiz: Comprehensions and Lambda: all 15 questions
Quiz: Comprehensions and Lambda · Question 7 of 15
What does this print? (code)
What does this print?
f = lambda a, b=10: a + b
print(f(5))
- A.5
- B.15
- C.An error
- D.10
Answer & explanation
Correct answer: 15
Lambdas can have default parameters.
Can you get the rest right without peeking?
Take the timed Quiz: Comprehensions and Lambda quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →