Uploaded by dhterno94

Amadou 4 4.py

advertisement
Project: NumberSeries.py
Author: kanahiriyan tolesa
Find the sum and average of a string of numbers
"""
sum = 0
count = 0
while True:
number = input("Enter a number or press Enter if you want to
quit: ")
if number == "":
break
sum += float(number)
count += 1
print("The sum is", sum)
if count > 0:
print("The average is", sum / count)
Download