Python – Recursion
Practice Python recursion interview questions covering base cases, recursive calls, and common problems. Write short recursive functions and receive feedback on correctness and approach. Ideal for intermediate Python interview prep. First 2 questions are free with full feedback.
- Level Intermediate
- Questions 12
Try any track free — first 2 questions include full AI feedback. Subscribe to finish the track and unlock everything. Type or speak your answer — the first 2 questions include scoring and detailed AI feedback.
Sample python – recursion interview questions
Preview 6 questions from this track in quiz order. In the full quiz you answer one at a time — type or speak — then get a score and feedback.
-
What is recursion?
What a strong answer includes
A function that calls itself.
-
What is a base case?
What a strong answer includes
The condition that stops the recursion.
-
Write a recursive function to calculate factorial.
What a strong answer includes
Correct base case and recursive call.
-
Write a recursive function to calculate the nth Fibonacci number.
What a strong answer includes
Correct base cases.
-
What happens if there is no base case?
What a strong answer includes
Infinite recursion and stack overflow.
-
Explain the call stack in recursion.
What a strong answer includes
Each call is pushed until the base case, then unwinds.