Skip to main content

Lessons and exercises

Decomposition, and the scope rules that make it safe. This is the unit that decides whether later programs stay readable as they grow.

Lesson 2.1

Parameters and Arguments

Python passes references to objects. Rebinding a parameter inside a function does not affect the caller, but mutating a mutable argument does.

Lesson 2.2

Return Values

A function without an explicit return yields the null object. Returning is different from printing, and only one of them is usable by the caller.

Need help with this topic?

Work through questions with a tutor and get help with the steps you find difficult.

Get help with this topic