Assignment 11 — string analysis
Due time: Thursday February 6
Download
- Program vowely.py
Problem
- Develop a program
vowely.py
that separately reports on the vowel usage in some user-specified text.
Suggestion
- When doing string analysis it is sometimes helpful to put a string in standard (canonical) form.
- Often that form is a stripped, lower case version of the string.
- Doing so here, makes the counting easier — for example, there is no need to separately count the number of a's and A's.
Fact
- My solution uses a loop. Yours does not have to, but doing so could prove helpful in future endeavors.
Some program runs
Enter text: Are you doing okay today?
a: 3
e: 1
i's: 1
o's: 4
u's: 1
Enter text: Subbookkeeper is one of my favorite words (and I am not being faceious).
a's: 4
e's: 7
i's: 5
o's: 8
u's: 2
Enter text: Is rural juror a tongue twister?
a's: 2
e's: 2
i's: 2
o's: 2
u's: 3
Enter text: Tsk-tsk! Why cry?
a's: 0
e's: 0
i's: 0
o's: 0
u's: 0
© 2020 Jim Cohoon | Resources from previous semesters are available. |