Summary

Completed

Python functions help you write modular and reusable code, compute values, and perform actions based on context. In this module, you learned some of the rules and behavior associated with functions. These rules included dealing with inputs and outputs. Finally, you had the chance to extract and enhance code to make it more readable and maintainable.

You now know essentials like these about functions:

  • Functions can require arguments or make them optional.
  • You can extract reusable code and reuse it in a function.
  • Variable arguments and variable keyword arguments are useful when you don't know the exact inputs.

With these techniques and the knowledge of functions, you should feel more comfortable tackling bigger problems when you're writing Python code.