Home › Learning paths › Functions

🧩 Functions — learning path

🧩 Improver12 problemsFree · no login needed

What this path teaches

Arguments, defaults, return values, and scope. The recurring lesson: what a function prints and what it returns are different channels, and defaults are evaluated exactly once — at def time.

By the end: You can read any call site and signature pair and predict the binding — or the TypeError.

Your progress

0 of 12 opened

Start the path →

The problems, in order

  1. 1Calling a function before defining it
    🐛 Fix the bug · easy
  2. 2Calling a function with too few arguments
    🐛 Fix the bug · medium
  3. 3Positional arguments in the wrong order
    🐛 Fix the bug · medium
  4. 4Keyword argument typo
    🐛 Fix the bug · medium
  5. 5Default parameter values
    🔮 Predict the output · medium
  6. 6Function returning nothing
    🔮 Predict the output · easy
  7. 7Multiple return values
    🔮 Predict the output · medium
  8. 8Unpacking the wrong number of values
    🐛 Fix the bug · medium
  9. 9Swapping variables with tuples
    🔮 Predict the output · medium
  10. 10Tuple unpacking with functions
    🔮 Predict the output · medium
  11. 11Modifying a variable before it's assigned locally
    🐛 Fix the bug · medium
  12. 12Mutable default argument trap
    🔮 Predict the output · medium

How to work a path

Do the problems in order — each one assumes the rule taught by the one before it. Open a problem, try it in the interactive editor, and only then read the explanation. Progress is saved in this browser automatically (signed-in solves also earn XP and streaks). One path per week is a solid pace; finishing in a single sitting is allowed but not required.