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 3 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 "ay."(See 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:
1st Word: Coconut
2nd Word: Banana
3rd Word: Plum
First alphabetically: Banana
Longest: Coconut (7 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.
(5 points)
Instead of displaying the first word alphabetically and the longest word,
display all three words in order, as in the sample below.
(10 points)
Alphabetically: Banana Coconut Plum
Longest to Shortest: Coconut (7 letters) Banana (6 letters) Plum (4 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 "x" before the last letter.
So in "Pig Greek," the word "Cows" becomes "Soxs." This will take some work.
(10 points).
 The program should ask the user to enter 3 words. The

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!