# Allison Obourn
# CS 115, Autumn 2021
# Lecture 28

# This program prompts the user for a number of days and then
# prompts them for that many days worth of temperatures. It then
# computes and prints the number of those days that were above
# average and prints that out.

# NOTE: this program does not work correctly yet! It always prints 4
#       for days above average. We will fix this tomorrow. 
def main():
    days = int(input("How many days' temperatures? "))

    # a list with days number of spots that all store 0s
    temperatures = [0] * days 
    sum_temps = 0
    for i in range(1, days + 1): 
        temp = int(input("Day " + str(i) + "'s high temp: "))
        sum_temps = sum_temps + temp


    print()
    average = sum_temps / days
    print("Average temp = " + str(average))

    
    print("4 days were above average.")


main()
