Ask Question
10 October, 00:53

Write a program that takes a sentence as input and prints all the vowels in the sentence. Your program must use a for loop. Sample output: C:/>: python basic_for. py Enter a sentence: the cat was very cute.

+4
Answers (1)
  1. 10 October, 04:36
    0
    Python.

    Explanation:

    / / Ask user for input string and store it to variable

    sentence = input ("Enter a sentence: ")

    / / Loop through each character in string

    for character in sentence:

    / / Check for vowel

    if character = = 'a' or character = = 'e' or character = = 'i' or character = = 'o' or character = = 'u':

    / / print the vowel

    print (letter)
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “Write a program that takes a sentence as input and prints all the vowels in the sentence. Your program must use a for loop. Sample output: ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers