🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← 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?

  1. A.A return type
  2. B.A base case that stops the recursion
  3. C.A global variable
  4. 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 →