Introduction
Using a Python function is the first step into coding after basic conditionals and data structures. Functions allow reusability, which avoids duplication of code. When projects reuse code with functions, they become more readable and maintainable.
Scenario: Organize data about a rocket
Imagine you're creating a program to construct precise information about a space rocket. Reusable functions will allow you to not just compute information but also compose new values by mixing inputs and outputs from other functions.
What will I learn?
In this module, you'll learn to:
- Use default, required, and wildcard inputs.
- Make code reusable by extracting common patterns into separate functions.
- Return values, data structures, or computed results.
What is the main objective?
By the end of this module, you'll understand some of the rules and behavior associated with functions, including how to handle inputs and outputs.
Need help? See our troubleshooting guide or provide specific feedback by reporting an issue.