Skip to content

Language

Sign in

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.

  1. Run volume(5) and note the result.
  2. Try volume(5, 4, 2) and volume(h=1, l=5).
  3. Try volume() and volume(5, l=2) and record the errors.
  4. Write the rule for which parameters can be left out.
My observations
CallResult or error

Use your browser's Print option to print this page.

Ask Flint AI
EduFlint: learn and play for free