1. Add the missing base case
Fix the bug Easy ✓ Completedcountdown(n) should return a list like [3, 2, 1] for countdown(3) and an empty list for 0, but it recurses forever. Fix it without using a loop.
def countdown(n):
return [n] + countdown(n - 1)
print(countdown(3))def countdown(n):
if n <= 0:
return []
return [n] + countdown(n - 1)
print(countdown(3))