Answer to Question #97767 in Python for yousif

Question #97767
write a program that asks the user to enter two words, change them to upper case, then prints them in alphabetical order

Sample Run

First word: Zebra
Second word: Cat
CAT
ZEBRA
1
Expert's answer
2019-11-05T07:41:59-0500

word1 = input("First word: ")

word2 = input("Second word: ")


if word1 > word2:

   print(word2.upper())

   print(word1.upper())

else:

   print(word1.upper())

   print(word2.upper())


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS