Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In Python When I start by typing in letter and then press enter, the program prints etterlay. The program terminates when I input done Write

In Python

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

When I start by typing in "letter" and then press enter, the program prints "etterlay". The program terminates when I input "done" Write a program called StringManipulation that contains the functions in the list below. Think about how you function can call one another to do what you need to do. This will require some reading about Strings in the book. ca n combine each of these pieces, how each The main function. The main function runs a loop, asking the user to input a word. Covert your input to lowercase. The program prints out the input converted to Pig Latin and the input reversed. If the input is "done", the loop stops and the program ends. findFirstVowel, which takes in a String and returns an int. The re- turned int is the location of the first vowel in the String. If there is no vowel, just return the index of last character of the String. This function is essential to helping you with convertToPigLatin. How? Read on! convertToPigLatin, which takes in a String and returns a String. The re- turned String is the Pig Latin form of the input word. A word is converted to Pig Latin via the following mutually exclusive rules: - If the word starts with a vowel, move the vowel to the end of the word and additionally add "way" to the end of the word Otherwise move all the letters before the first vowel to the end of the word and additionally add "ay" to the end of the word. If there is no vowel, just return the string completely unchanged. Think about how findFirstVowel can tell you which rule to use

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

Students also viewed these Databases questions