Rocket writes numbers on five paper cards and stacks them.
"Let us be the total function," he says. "Each person takes the top card and passes the rest along."
Raven gets the last card and passes an empty hand. "What do you notice about the person with no cards?"
"They say 0, because there is nothing to add," Rocket says.
Nova glows. "Here is a hint. Then the answers travel back, and each person adds their card."
| Bonus recap statement | True or false? |
|---|---|
| Every recursion needs a base case. | ? |
| The smaller step should move away from the base case. | ? |
| A skipped base case can cause a RecursionError. | ? |
| The empty list is the base case for total. | ? |
Quest complete! Next week we solve the same jobs two ways: with a loop and with recursion.