In this video course, you practiced what you learned in Python Basics: Functions and Loops. You created custom functions, which consist of two parts:
- The function signature, initiated with the
def
keyword, which includes the function’s name and parameters. - The function body, where the code executes every time the function is called.
Functions provide reusable components in your code, preventing repetition and enhancing readability and maintenance.
Along the way, you practiced using for
loops, taking input from the user, and formatting numbers in f-strings.
If you haven’t already tackled the Python Basics: Functions and Loops Quiz, now is a great time to give it a whirl.
Anonymous on Feb. 13, 2024
Spent a little bit too much on this, but learned a lot. Also gave myself some extra challenge by calculating the monthly interest and some small error handling. There are probably minor errors here and there: