# Program2 # # This program solicits snowfall for each day in the week # and accumulates the total. It reports each day's # snowfall as it is entered. # # It then computes the average snowfall, and reports the # total and average amounts. # # Programmer Clem Kadiddlehopper # Date written: 12 October 2009 def main ( ): total = 0.0 average = 0.0 snowfall = 0.0 print " SpoutSprings" print " Weekly Snowfall Report" print " ======================" print for day in range (7): snowfall = input ("Enter the precipitation for day " + str (day + 1) + ": ") total = total + snowfall print "Day",day+1, ":\t", snowfall average = total / 7 print "Total:\t", total print "Avg:\t", round(average,2) main ( )