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
defkeyword, 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.

John Akpan on July 7, 2024
This is good. To make things simpler, I will use the try and except ValueError in the code. It helps manages the exception codes and troubleshooting.