Hint: Steps for developing the program
Don't proceed to the following step until you can "prove" that the current step works.
- Count the number of a's in the file.
- After processing that file for a's, add code to count the number of b's.
- Convert the program to count the number of a given letter inside a loop that goes from 'a' to 'z'. (A for loop can iterate through letters)
- Write a separate program to count the number of a's in each line.
- Combine the two programs
This topic: CenterForComputing
> WebHome >
Syllabi >
CSC121SylF2025 >
CSC121F2025Lab05 > CSC121F2025Lab05Hint02
Topic revision: r1 - 2025-07-22 - CathyBareiss