8.10 Code Practice Question 1

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

Note: The variable names x and y are required for this question

810 Code Practice Question 1 Write code that takes in two words from user input and stores them in the variables x and y respectively Then the programs the val class=

Respuesta :

x = input("Enter a word: ")

y = input("Enter a word: ")

x,y = y, x

print(x)

print(y)

I hope this helps

Since we need to perform some coding functions such as:

  • Asking for the input of a number
  • Storing them as individual variables
  • Printing/Displaying the values independently.

  • First thing we need to do is to declare the unknown variables as x and y

Next would be to write the input this way:

x= input ("Put a word:")

y= input ("Put a second word:")

x,y = y, x

Print(x0

Print(Y)

Read more about programming here:

https://brainly.com/question/18900609