Question: Write a program, namedconditions.py, as follows: (WRITE IN PYTHON) create three variables: letter1 Set letter1 equal to the letter m letter2 Set letter2 equal to
Write a program, namedconditions.py, as follows: (WRITE IN PYTHON)
- create three variables:
- letter1
- Set letter1 equal to the letter "m"
- letter2
- Set letter2 equal to the letter "u"
- letter3
- Set letter3 equal to the letter "y"
- Create a test using if statements for each variable.
- If the variable is a vowel, print the letter is a vowel:
- EX: u is a vowel
- Use f strings to pass the variable in to the print statement
- If the variable is a y, print the letter is a y
- EX y is a y
- If the variable is a consonant, print that the letter is a consonant
- EX: m is a consonant
- Use an if-elif-else structure for testing each variable.
The output will look like this:
m is a consonant.
u is a vowel.
y is a y.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
