Write Python Program Calculate Product Multiplying Numbers Given Tuple
# write a python program to calculate the product multiplying all the numbers of a given tuple.
tuple_length = int(input("Enter tuple length : "))
my_tuple = ()
for x in range(tuple_length):
temp = float(input("Enter tuple item : "))
my_tuple += (temp,)
product = 1
for item in my_tuple:
product = product * item
print("Product of tuple items is : ", product)
0 Comments