← Quiz: Comprehensions and Lambda: all 15 questions
Quiz: Comprehensions and Lambda · Question 5 of 15
What is missing from a recursive function that causes a RecursionError?
What is missing from a recursive function that causes a RecursionError?
- A.A return type
- B.A base case that stops the recursion
- C.A global variable
- D.A lambda
Answer & explanation
Correct answer: A base case that stops the recursion
Without a base case, the function keeps calling itself until Python's limit is reached.
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 →