Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- x = int(input("how many numbers?: "))
- list = []
- for num in range(0,x):
- y = float(input("enter number: "))
- list.append(y)
- sum = 0
- a = 0
- for num1 in list:
- sum = sum + list[a]
- a = a+1
- print("sum of the numbers is: ",sum)
- avg = sum/x
- print("Average is: ",avg)
Add Comment
Please, Sign In to add comment