124k views
2 votes
PYTHON QUESTION

Exercise 9.3.6: Coordinate Pair Pair
Ask the user for two numbers. Then, make a tuple out of the two numbers
they give you and print it.

1 Answer

3 votes

Answer:

First_Number =input("Enter your first number")

Last_Number =input("Enter your last number")

tup1=(First_Number, Last_Number)

print(tup1)

Step-by-step explanation:

The above Python program asks the user to input two numbers, and then it creates a tuple out of it, and finally prints the tuple. Remember tuple uses () and the tuple items are mentioned inside it and are separated by a comma. And we can print tuple fully through the print statement mentioned above in the program. Remember that tuples are immutable, and this means you cannot update or change the values of the tuple. However, you can concatenate two tuples.

User Joe Malebe
by
7.4k points