Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hello, please help me figure out my python3 code. LAB?- Add the necessary code to the source file VOWEpr, that asks the user to enter

Hello, please help me figure out my python3 code.

image text in transcribedimage text in transcribed
LAB?- Add the necessary code to the source file VOWEpr, that asks the user to enter a sentence and extracts the sentence from the input terminal. The program should then display the sentence entered, the number of characters in the sentence, as well as the counts for all vowel types in the sentence. Keep in mind that your program should count both upper and lowercase vowels. Sample runs are shown below. Sample 1 This program asks the user for a sentence, searches the sentence for all vowels, and displays the number of times each vowel appears in the sentence. Enter a sentence: Hello there! The sentence "Hello there!" has 12 characters, and there are Sample 2 This program asks the user for a sentence, searches the sentence for all vowels, and displays the number of times each vowel appears in the sentence. Enter a sentence: supercAlifragilIsticexpialidOcious The sentence "supercAlifragilIsticexpialidOcious" has 34 characters, and there are infoString = ('This program asks the user for a sentence,\ ' 'searches the sentence for all vowels,\ ' 'and displays the number of times each vowel appears in the sentence.\ \ ') print(infoString) # count of the number of a/A occurrences in the sentence a_count = 0 # count of the number of e/E occurrences in the sentence e_count = 0 # count of the number of i/I occurrences in the sentence i_count = B # count of the number of 0/0 occurrences in the sentence o_count = 0 # count of the number of u/U occurrences in the sentence u_count = 0 # prompt for input sentence = input('Enter a sentence: ') # determine the vowel counts and total character count # display the results

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Programming questions