Graded Problem Set #3.2
String Problems
Background
These problems should be completed on your own. Unlike the practice problems, where you are allowed, and even encouraged, to talk about the process with your classmates, these should be attempted on your own. If you have difficulty with these, please reach out to me for assistance or guidance.
Activities
Please try to make your program output look as much like the example as possible and verify it works with the example input provided. If you have difficulty finding the information or understanding how to approach the problem, you should contact me.
To complete this activity, you will need to create the following scripts:
- LOOP G3 - vowelCount()
- LOOP G4 - calculateAverage()
LOOP G3
It was one giant Vowel movement
Rita Book is the librarian in the school where you work. She is trying to figure out how to determine the AR level of a book (a score that indicates what grade level of student should be able to handle the book). She want your help on this project. One of the things that they use to determine the AR level of a book is to count vowels in a word or a sentence.
Write a Python function that conforms to the following:
- Function name
- vowelCount()
- Parameters
- One String - assumed to be a word or a sentence
- Return value
- The integer count of the number of vowels in the sentence.
- In this activity we will only count the five "standard" vowels, and not the y/Y
- Examples
- Special Notes
- Your code should handle both upper case and lower case letters.
- You can do this bye either recognizing both cases in your conditional
- OR, you can convert the input parameter to be all one case or the other
- uppercase = original.upper()
- lowercase = original.lower()
LOOP G4
That sounds average
As a teacher you will want to be able to know what was the average grade on a test.
- Function name
- calculateAverage()
- Parameters
- a list of numbers
- Return value
- the average of all of the numbers in the list
- Examples