Question: Write a Python script that takes a phrase/sentence from user and displays its vowels (uppercase or lowercase a, e, i, o and u) and their

Write a Python script that takes a phrase/sentence from user and displays its vowels (uppercase or lowercase a, e, i, o and u) and their indexes. A sample interaction when the script is run must look like follows. Item in bold font is response entered by the user. Enter a phrase/sentence: I like Python! Indexes of vowels: I at index 0 i at index 3 e at index 5 o at index 11 Take the phrase/sentence from user as a string value (Say S) Define a variable and initialize it to zero (Say counter) For each character c in the string S If the character c is a vowel i. display the character and the index Increase the counter variable by 1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
