Question #118496

9.10 Code Practice: Question 1

Write code that takes in two words from user input. Then, the program should swap the two variables that hold the inputs and print the words in backward order.

Expert's answer

#Promt user to input words
word1 = input("Enter the first word: ")
word2 = input("Enter the second word: ")

#print the words in backward order
print(word2, word1)

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!

LATEST TUTORIALS
APPROVED BY CLIENTS