Computer Science, asked by saniyasan1230, 3 months ago

Write a python program to input n numbers from user, store these numbers

in a tuple and print maximum, minimum number along with the sum and

mean of all the elements from this tuple.​

Answers

Answered by Equestriadash
83

n = int(input("Enter the number of integers you'd like to enter: "))

print()

l = list()

for i in range(n):

   x = int(input("Enter the integer: "))

   l.append(x)

   print()

print()

nl = tuple(l)

print(nl, "is your given tuple.")

print()

print(max(nl), "is the HIGHEST value in the tuple.")

print()

print(min(nl), "is the LOWEST value in the tuple.")

print()

print(sum(nl), "is the SUM of the values in the tuple.")

print()

s = sum(nl)

l = len(nl)

mean = s/l

print(mean, "is the MEAN of the tuple.")

Answered by ymanas137
1

Answer:

python program

Explanation:n = int(input("Enter the number of integers you'd like to enter: "))

print()

l = list()

for i in range(n):

  x = int(input("Enter the integer: "))

  l.append(x)

  print()

print()

nl = tuple(l)

print(nl, "is your given tuple.")

print()

print(max(nl), "is the HIGHEST value in the tuple.")

print()

print(min(nl), "is the LOWEST value in the tuple.")

print()

print(sum(nl), "is the SUM of the values in the tuple.")

print()

s = sum(nl)

l = len(nl)

mean = s/l

print(mean, "is the MEAN of the tuple.")

Similar questions