# Program to compute the average of n numbers # (user says how many) # Matt Bishop, Apr. 5, 2009 # for ECS 10 Spring 2009 def main(): # initialize counters total = 0 count = 0 # get the number of numbers to be entered n = input("how many numbers will you enter? "); # read them in, keeping a running total and count for i in range(n): total = total + input("enter a number: "); count = count + 1; # print out the average print "The average of your", n, "numbers is", total % count; main()