Write a program that asks the user for a letter the program


Python Assignment incorporating Functions & loops

Write a program that asks the user for a letter. The program should then determine if the letter is a vowel or not.

In this homework you will, of course, be writing functions to perform the individual components of the program. Make sure that you follow these requirements EXACTLY.

For this assignment, you should have the following functions:

1. First function: AskForLetter(): This function will repeatly as the user for a single letter until the user types ‘quit' to exit the program or they have entered a vowel. This function will use the built-in python function called len. len is used to determine the length of an input. For example, if the input from the user is ‘i', len(‘i') will return 1. Try this in python interpreter. If the len of the user input is 1, then this function should call the second function below.

2. Second function: IsVowel(letter): This function will take as input a variable called letter and will determine if this letter is a vowel or not. If it is a vowel it will return True and is not it will return To determine if letter is vowel or not, this function will call a third and a fourth function below.

3. Third function: IsLowercaseVowel(letter): this function will take a single variable as input called letter and will return True if the letter is a lowercase vowel and will return False if not.

4. Fourth function: IsUppercaseVowel(letter): this function will take a single variable as input called letter and will return True if the letter is a uppercase vowel and will return False if not.

5. Fifth function: PrintIsVowel(): this function will print a sentence to the user (standard out) indicating if the input is a vowel or not. It will be called inside AskForLetter(letter). This function will take as input the original letter input by the user so that it can be included in the output sentence.

Make sure you account for user input error. Test your code by trying to cause errors in input.

If you can write the program solving the Assignment instructions provided. Requirements for each function are to be followed exactly.

Solution Preview :

Prepared by a verified Expert
Python Programming: Write a program that asks the user for a letter the program
Reference No:- TGS02269616

Now Priced at $30 (50% Discount)

Recommended (94%)

Rated (4.6/5)