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


CCC Online Test Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Online Exam Quiz O Level NIELIT Study material and Quiz Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Best Website and Software Company in Allahabad Website development Company in Allahabad