Write a program that asks the user for three names, then prints the names in reverse order.

Sample Run:

Please enter three names:
Zoey
Zeb
Zena

Zena Zeb Zoey


Hint: One solution to this challenge would be to use 3 separate variables, one for each name.

Respuesta :

Answer:

print("Please enter three names:")

name1 = input()

name2 = input()

name3 = input()

print(name3 + " " + name2 + " " + name1)

Explanation:

*The code in Python.

Ask the user to enter three names

Store these names in variables name1, name2 and name3

Print the variables in the following order name3, name2, name1