Hey there! Today we are going to explore functions, which are like mini-machines that run your code whenever you need them.
In coding, a function is a named block of code that does a specific job. Instead of writing the same steps over and over, you write them once inside a function and call it whenever you want.

Think of a function like a juice blender. You put ingredients in, which are called inputs or parameters. The blender runs its program, and then it gives you delicious juice, which is the output or return value.
To design a program with nested loops inside functions, we break down a big problem into smaller subproblems. For example, we can make a function that draws one row of stars, and then call it inside a loop to draw a whole grid.
Design a text-based program that prints a 3x3 grid of stars using a function with nested loops.
- Identify the subproblems: We need to print a single star, print a row of stars, and repeat that row multiple times.
- Define a function named 'print_row' that uses a loop to print 3 stars side-by-side.
- Create a second loop outside the function that calls 'print_row' exactly 3 times.
- Run the program to see the nested loops work together to create a perfect 3x3 grid of stars.
