Python function calls: activity sheet
Goal: See how Python matches positional, keyword and default arguments to parameters, and when a call fails.
You need: Only the simulation is needed. You can repeat the calls in Python.
Safety: No special safety needs.
- Run volume(5) and note the result.
- Try volume(5, 4, 2) and volume(h=1, l=5).
- Try volume() and volume(5, l=2) and record the errors.
- Write the rule for which parameters can be left out.
| Call | Result or error |
|---|---|
Use your browser's Print option to print this page.