Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Scenario The continue statement is used to skip the current block and move ahead to the next iteration, without executing the statements inside the loop.

  • Scenario

    The continue statement is used to skip the current block and move ahead to the next iteration, without executing the statements inside the loop.

    It can be used with both the while and for loops. Your task here is very special: you must design a vowel eater! Write a program that uses:

  • a for loop;

  • the concept of conditional execution (if-elif-else)

  • the continue statement.

    Your program must:

  • ask the user to enter a word;

  • use userWord = userWord.upper() to convert the word entered by the user to upper

    case; we'll talk about the so-called string methods and the upper() method very soon -

    don't worry;

  • use conditional execution and the continue statement to "eat" the following vowels A, E,

    I, O, U from the inputted word;

  • print the uneaten letters to the screen, each one of them on a separate line.

    Sample Code:

    # Prompt the user to enter a word # and assign it to the userWord variable.

    for letter in userWord: # Complete the body of the for loop.

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

Step: 3

blur-text-image

Ace Your Homework with AI

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

Get Started

Recommended Textbook for

Concepts of Database Management

Authors: Philip J. Pratt, Joseph J. Adamski

7th edition

978-1111825911, 1111825912, 978-1133684374, 1133684378, 978-111182591

More Books

Students also viewed these Databases questions

Question

=+2 How does the preparation and support for each type of IE vary?

Answered: 1 week ago

Question

=+What is the extent of the use of each type of IE?

Answered: 1 week ago