Question: Write a python code program that prompts a user for a single character from the alphabet and print Vowel or Consonant depending on the user

Write a python code program that prompts a user for a single character from the alphabet and print Vowel or Consonant depending on the user input.

must include algorithimic comments

If the user input is not a letter between a and z or A and Z or is a string of length > 1 print an error.

ALGORITHM:

1. Get user input

2. Check if input is of length greater than 1 (if so print error)

3. Check to see if input contains only letters

4. If only letters then check to see if input is a vowel (if so print vowel, if not print consonant)

5. If input is not letter or greater than 1 (print error)

Please place these steps as comments in your code.

Sample input/output:

 
 

please enter one letter: B

 

Consonant

 
 

please enter one letter: 2a.d

 

error

Note: the values in bold represent the user input.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!