**Using python**
Write a program which repeatedly takes input of numbers from the user until enters “notmore”.
Once “notmore” is entered, print out the total, count, and average of the numbers. If anything else
is given input, ignore that and continue with taking input.
Answers
Answered by
0
nums = []
while True:
n = input("enter num: ")
if n == "notmore":
total = sum(nums)
count = len(nums)
print(f"total: {total}\ncount: {count}\naverage: {total / count}")
break
if n.isnumeric():
nums.append(int(n))
continue
Answered by
4
Answer:
nums = []
while True:
n = input("enter num: ")
if n == "notmore":
total = sum(nums)
count = len(nums)
print(f"total: {total}\ncount: {count}\naverage: {total / count}")
break
if n.isnumeric():
nums.append(int(n))
continue
Similar questions