Teacher-curated, self-paced courses. Looking for a guided sequence through a full topic? See Learning Paths.
You have used functions made by others: print(), len(), range(). Now you write your own. A function is a group of lines with a name, so that you write them once and use them as often as you like. In this course you define and call a function, give it values to work with, get an answer back with return, set default values, make functions that answer yes or no, and let one function use another. You learn where a variable lives and why a variable made inside a function is not known outside it, and how to test a function with a table of cases. A toolbox of functions is the project at the end. The practice runs your functions on many inputs and tells you which ones fail.