Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I am not sure ho to correct my code to count the vowels. Do I need to disregard punctuation or am I missing something else?
I am not sure ho to correct my code to count the vowels. Do I need to disregard punctuation or am I missing something else?
Question 3(2.5pts) : Count the number of vowels in a phrase input by the user. An output Example: Enter a phrase: I hope the exam will not be very hard! The phrase contains 11 vowels. % Question Three ount =0 hrase=input("Enter a phrase: ") lowels =[ "A", "a", "E", "e","I I,"i,"O,"0," U,"u] if vowels in phrase: count +=1 print("The phrase contains \{\} vowels. "format(count))
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started