Question: The program should ask the user to enter 3 words. The program should strip the words so there are no accidental leading or trailing spaces.
The program should ask the user to enter words.
The program should "strip" the words so there are no accidental leading or trailing spaces.
Tell which comes first alphabetically.
Tell which is longest, and tell how many characters.
Display all three words with all capital letters, and then with all lowercase letters.
Display all three words in pig latin.
For pig latin, move the first letter to the end of the word and add aySee samples below.
hing: For the items listing the first word alphabetically and the longest word, use and instead and in your test conditions. Otherwise, if there is a tie, it's possible that nothing will print.
Sample Input and Output:
st Word: Coconut
nd Word: Banana
rd Word: Plum
First alphabetically: Banana
Longest: Coconut letters
Capitalized: COCONUT BANANA PLUM
Lowercase: coconut banana plum
Pig Latin: oconutCay ananaBay lumPay
Top Ten
Python assumes all capital letters come before all lowercase letters. So "Banana" with a capital B comes before "apple" with a lowercase a Come up with a way around that so the program alphabetizes words correctly, regardless of how they're capitalized.
points
Instead of displaying the first word alphabetically and the longest word,
display all three words in order, as in the sample below.
points
Alphabetically: Banana Coconut Plum
Longest to Shortest: Coconut letters Banana letters Plum letters
Add one more output, the words in "Pig Greek." We'll define "Pig Greek" as the following:
Remove any letter W capital or lowercase
Change any C to S capital or lowercase
Add an before the last letter.
So in "Pig Greek," the word "Cows" becomes "Soxs." This will take some work.
points
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
