Hey there! Ready to explore how programmers handle text and repeat actions? Let's dive into the world of strings and nested loops!
A string is just a sequence of characters, like letters, numbers, or symbols, wrapped in quotation marks. To solve complex problems, we use a software design process: first we understand the goal, then we break it down into smaller subproblems.

When we need to repeat an action inside another repeated action, we use nested loops. Think of a nested loop like a clock: the inner loop (the minute hand) must complete a full cycle before the outer loop (the hour hand) moves forward by one tick.
To design a program that processes text character-by-character across multiple words, we break the task into subproblems. We use an outer loop to look at each word, and an inner loop to look at each letter inside that word.
Use the software design process to create a program that takes a list of words, loops through each word, and counts how many times the letter 'e' appears in total.
- Identify the subproblems: We need to track the total count, select one word at a time, and inspect each letter of the active word.
- Initialize a counter variable to 0 to keep track of the letters found.
- Create the outer loop to iterate through each string in our list of words.
- Create the nested inner loop to loop through each character of the current string.
- Inside the inner loop, write a conditional statement: if the character matches 'e', increase the counter by 1.
- Print the final counter value after both loops finish running.
