Python Functions · Week 2 — Functions with Parameters
One then two parameters; positional arguments; reusing one function with different inputs.
Week 2: Functions with Parameters
In Week 1, you learned how to create a simple function using def and call it with parentheses. This week, you'll make your functions more flexible by giving them parameters. Parameters let you pass information into a function so it can work with different data each time you call it. You'll start with one parameter, then move to two parameters, and practice calling functions with different arguments. Get ready to see your functions come to life with sports, ice cream, and pet rescue adventures!
Learning goals
- Define a function that takes one parameter. - Define a function that takes two parameters. - Call a function with positional arguments. - Understand that the order of arguments matters. - Reuse functions with different inputs.