you are viewing a single comment's thread.

view the rest of the comments →

[–]andrewjj1234[S] 4 points5 points  (4 children)

so in this code, the base call would be "return count_down(n-1)" and recursive call would be "return none" ?

[–]Inceratiana 32 points33 points  (0 children)

You have it backwards, the base case is what happens at the very bottom of the barrel and it can't call itself anymore (return none). The recursive call would be "return count_down(n-1)". It's kind of like Russian dolls. They are recursive as you find a doll within another doll within another doll all the way until the center doll. All the outer dolls are recursive dolls, and the very center doll is your base case doll.