python program to take the temperatures of all 7 days of the week and displays the average temperature of that week

Programming Example

WAP to take the temperatures of all 7 days of the week and displays the average temperature of that week.

Solution

d1=int(input("Temperature of day 1 : "))
d2=int(input("Temperature of day 2 : "))
d3=int(input("Temperature of day 3 : "))
d4=int(input("Temperature of day 4 : "))
d5=int(input("Temperature of day 5 : "))
d6=int(input("Temperature of day 6 : "))
d7=int(input("Temperature of day 7 : "))
avg=(d1+d2+d3+d4+d5+d6+d7)/7
print("The average Temperature is : ",avg)
Output