Answered step by step
Verified Expert Solution
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
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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started