Question: Exercise 5 Conditionals Exercise 5 Problem Use the variable x as you write this program. x will represent a string. Write a program that determines

Exercise 5
Conditionals Exercise 5
Problem
Use the variable x as you write this program. x will represent a string. Write a program that determines if x is a vowel (a, e, i, o, and u ). If yes, print _ is a vowel, where the blank is the value of x. If no, print _ is not a vowel, where the blank is the value of x.
Expected Output
If x is a, then the output would be: a is a vowel.
If x is z, then the output would be: z is not a vowel.
Important
The variable x is already declared for you. Please do not modify the code on lines 5 and 6.
TRY WITH X ='A'
Traceback (most recent call last):
File "/home/codio/workspace/code/selection/exercise5.py", line 12, in
if x_lower in 'aeiou':
^^^^^^^
NameError: name 'x_lower' is not defined
TRY WITH X ='Z'
Traceback (most recent call last):
File "/home/codio/workspace/code/selection/exercise5.py", line 12, in
if x_lower in ['a','e','i','o','u']:
^^^^^^^
NameError: name 'x_lower' is not defined
Submit your code to be evaluated when ready. Remember, do not edit the code on lines 5 and 6.
Check It!(2 left)

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!