Assignment 10 — string analysis
Due by class: Wednesday, February 24
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: 3
e: 1
i: 1
o: 4
u: 1
Enter text: Subbookkeeper is one of my favorite words (and I am not being faceious).
a: 4
e: 7
i: 5
o: 8
u: 2
Enter text: Is rural juror a tongue twister?
a: 2
e: 2
i: 2
o: 2
u: 3
Enter text: tsk-tsk
a: 0
e: 0
i: 0
o: 0
u: 0
🦆 © 2022 Jim Cohoon | Resources from previous semesters are available. |