Write a program to find sum and mean of the elements which are entered by the user .( Python program)
Answers
Answered by
2
Answer:
n = int(input("How many numbers will you enter? \n"))
print("Enter all",n,"elements-")
sum = 0
for i in range(n):
x = int(input())
sum = sum + x
print("The sum of all",n,"numbers is",sum)
print("The mean of all",n,"elements is",(sum/n))
Explanation:
Similar questions