'''
# average3.py
def main():
    sum=0.0
    count=0
    x=eval(input("Enter a number(nagative to quit)"))
    while x>=0:
        sum=sum+x
        count=count+1
        x=eval(input("Enter a number(nagative to quit)"))
    print("\nThe average of the numbers is",sum/count)
main()
'''


# average4.py
def main():
    sum=0.0
    count=0
    xStr=input("Enter a number(<Enter> to quit)")
    while xStr!="":
        x=eval(xStr)
        sum=sum+x
        count=count+1
        xStr=input("Enter a number(<Enter> to quit)")
    print("\nThe average of the numbers is",sum/count)
main()
