Module 4 · Functions, tuples, dictionaries, exceptions, and data processing
How functions communicate with their environment
Functions get useful when you can feed them data. Meet parameters and arguments — the slots a function declares and the values you pass in — and the two ways to pass them: by position and by name.
Begin lesson 1 →- 1Parameterized functionsGive a function inputs: parameters are the named slots, arguments are the values you pass in.→
- 2Positional parameter passingArguments fill parameters by their position — first to first, second to second.→
- 3Keyword argument passingName each argument at the call, and the order stops mattering.→
- 4Mixing positional and keywordUse both at once — with the one rule that keeps Python happy.→
- 5QuizCheck your grip on parameters, positional order, and keyword arguments.→