@extends('template') @section('title') Predicting the outcome of recursive calls @stop @section('content') # Predicting the outcome of recursive calls Predicting the outcome helps solidify your understanding of recursion. On this page, you are given recursive function definitions, and you will predict what is printed with various invocations. ## Example 1. `flow` ```py def flow(num): if num > 0: print('before', num) flow (num - 2) print('after', num) else: print('base case') ``` ## Your task: Predict what the `flow` function prints with these invocations (write it down): ```py flow(4) ``` You can see the solution for `flow(4)` by clicking here.
```py flow(7) ``` You can see the solution for `flow(7)` by clicking here.