Assignment 10 — string analysis
Due Time: Monday, September 14
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
- A loop is not necessary.
Some possible program runs
Enter text: Are you doing okay today?
a's: 3
e's: 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: Why tsk-tsk?
a's: 0
e's: 0
i's: 0
o's: 0
u's: 0
© 2020 Jim Cohoon | Resources from previous semesters are available. |