PYTHON BASICSChapter 4 · Functions
Inputs to functions
To make a function do different things depending on the situation, we give it parameters (inputs). When we call the function, we pass arguments (values) into those parameters.
Worked example
How it reads
- def greet(name, time): defines two parameters, name and time
- greet("Nova", "morning") calls the function, passing "Nova" into name and "morning" into time
- The arguments must be passed in the same order as the parameters

Cloud tip: Parameters are the names listed in the function definition. Arguments are the actual values you send to the function when calling it.


