To gain experience with for loops.
For this lab you will write a program to count how many times a character appears in a string.
Below is an example run of how this program should work:
Enter a message: hello Enter a character: l There are 2 occurences of l in hello
And here is another:
Enter a message: this is a longer test string Enter a character: t There are 4 occurences of t in this is a longer test string
When you are finished, please submit the .py file for the lab on Canvas. To do so, you'll need to navigate to where you saved the file on your computer.
Copyright © 2023 Ian Finlayson | Licensed under a Attribution-NonCommercial 4.0 International License.