ā back to unit
Challenge
# functions
Sum It Up... Recursively!
Let's revisit adding up numbers from n down to 1 ā but this time using recursion, where a function calls itself! š
Finish countdown_sum(n):
- Base case: if
nis 0 or less, return0. - Recursive case: otherwise, return
npluscountdown_sum(n - 1).
š” need a hint?
func-countdown-recursion.pyš given lines are locked ā write your code in between
loading...