# 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 n is 0 or less, return 0.
  • Recursive case: otherwise, return n plus countdown_sum(n - 1).

šŸ’” need a hint?

func-countdown-recursion.pyšŸ”’ given lines are locked — write your code in between
loading...