Programming Examples

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


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


Online Exam Quiz for One day Exam Online Typing Test CCC Online Test 2026 Best Computer Training Institute in Prayagraj (Allahabad) Best Java Training Institute in Prayagraj (Allahabad) Best Python Training Institute in Prayagraj (Allahabad) O Level Online Test in Hindi Best Website and Software Company in Allahabad