Edhesive 9.10 Question 1

Write code that takes in two words from user input and stores them in the variables x and y respectively. Then, the program should swap the values in x and y, and print x and y.

Edhesive 910 Question 1 Write code that takes in two words from user input and stores them in the variables x and y respectively Then the program should swap th class=

Respuesta :

x = input("Enter a word: ")

y = input("Enter a word: ")

w = y

y = x

x = w

print(x)

print(y)

I hope this helps!

Answer:

x=input("Enter a word: ")

y=input("Enter a word: ")

x,y = y, x

print(x)

print(y)

Explanation:

I got 100%

ACCESS MORE