Hey there! Ready to explore how computers handle text? Let's dive into the world of strings and see how we can control them!
In coding, any text inside quotation marks is called a string. We can join strings together, search inside them, or even repeat them using loops to solve real-world problems.

To solve complex tasks, software designers break problems into smaller subproblems. We can use nested loops—a loop inside another loop—to create repeating patterns of text, like a grid of stars.
Let us analyze how a nested loop builds a text grid. The outer loop controls which line we are writing, while the inner loop prints each character side-by-side on that same line.
Use a software design process to write a program that prints a 3x3 grid of stars (*) using nested loops to solve the subproblem of grid formatting.
- 1. Identify the primary goal: We need to output 3 rows of stars, with 3 stars in each row.
- 2. Break it into subproblems: Subproblem A is printing a single star. Subproblem B is repeating that star to make a row. Subproblem C is repeating the entire row vertically.
- 3. Write the outer loop: Create a loop that runs 3 times to manage the 3 rows.
- 4. Write the nested inner loop: Inside the outer loop, create another loop that runs 3 times to print the stars next to each other.
- 5. Test the code: Run the program to verify it displays a clean 3x3 grid of text stars.
