Answer to Question #271387 in Python for dhanushan

Question #271387

A group of students were monitoring the temperature daily basis over a one-year period to calculate the daily average temperature and the average temperature for the whole year (you may assume a year contain 365 days). Ten readings were taken each day.

i. Write an algorithm for the above task.

ii. Convert the above algorithm (written in part (i)) to a Python program to output the daily average temperature and the average temperature for the whole year.


1
Expert's answer
2021-11-25T18:04:54-0500
temp1=int(input("Enter the first temperature: "))
temp2=int(input("Enter the second temperature: "))
temp3=int(input("Enter the third temperature: "))
temp4=int(input("Enter the fourth temperature: "))
temp5=int(input("Enter the fifth temperature: "))
temp6=int(input("Enter the sixth temperature: "))
temp7=int(input("Enter the seventh temperature: "))
temp8=int(input("Enter the eighth temperature: "))
temp9=int(input("Enter the nineth temperature: "))
temp10=int(input("Enter the tenth temperature: "))
average=(temp1+temp2+temp3+temp4+temp5+temp6+temp7+temp8+temp9+temp10)/10
print("Average daily temperature is: ",average)
yearly=(average*365)/12
print("Yearly everage is: ",yearly)

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS