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)

  1. create three variables:
    1. letter1
      1. Set letter1 equal to the letter "m"
    2. letter2
      1. Set letter2 equal to the letter "u"
    3. letter3
      1. Set letter3 equal to the letter "y"
  2. Create a test using if statements for each variable.
    1. If the variable is a vowel, print the letter is a vowel:
      1. EX: u is a vowel
        1. Use f strings to pass the variable in to the print statement
    2. If the variable is a y, print the letter is a y
      1. EX y is a y
    3. If the variable is a consonant, print that the letter is a consonant
      1. EX: m is a consonant
  3. 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

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 Programming Questions!