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