Write a program to obtain temperatures of 7days(Monday, Tuesday…..Sunday) and
then display average temperature of the week
Answers
Answered by
3
Answer:
d1 = float(input("Enter Sunday Temperature: "))
d2 = float(input("Enter Monday Temperature: "))
d3 = float(input("Enter Tuesday Temperature: "))
d4 = float(input("Enter Wednesday Temperature: "))
d5 = float(input("Enter Thursday Temperature: "))
d6 = float(input("Enter Friday Temperature: "))
d7 = float(input("Enter Saturday Temperature: "))
avg = (d1 + d2 + d3 + d4 + d5 + d6 + d7) / 7
print("Average Temperature =", avg)
Similar questions