Respuesta :

Answer:

First_Number =input("Enter your first number")

Last_Number =input("Enter your last number")

tup1=(First_Number, Last_Number)

print(tup1)

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.

Following are the Python program to add value into a tuple:

Program Explanation:

  • Defining an empty tuple "t".
  • Defining "a, b" variable that input value from the user-end.
  • Defining tuple variable "t" that adds input value.
  • Using the print method that prints tuple value.

Program:

t = ()#defining an empty tuple

a =input("Input first number: ")#defining a variable that input value

b=input("Input second number: ")#defining b variable that input value

t = (a,b)#defining tuple that add input value

print(t)#print tuple value

Output:

Please find the attached file.

Learn more:

brainly.com/question/15264456

Ver imagen codiepienagoya