The Scenario:
You have noticed that the daily temperature highs posted on weather sites is not a good approximation of the daily average temperature. In order to assist in determining the overall temperature for a day you want to take 3 daily measurements, one in the morning, afternoon, and the evening. With this information you might be able to better plan for the upcoming days.
The Request:
Your need to develop an application that will take measurements at 3 times and then display the average temperature for the day.
Behaviors:
Your assignment:
Develop an algorithm for the project and then build a functional system to take temperature measurements, calculate the average, and then display the information to the user. You will turn in the completed application, as well as a well-documented algorithm.
Using pycharm(python)
morning = float(input("Enter the morning temperature: "))
afternoon = float(input("Enter the afternoon temperature: "))
evening = float(input("Enter the evening temperature: "))
avgTemperature = (morning + afternoon + evening) / 3.0
print("\n Average temperature for the day: ", avgTemperature)
Sample Output:
Enter the morning temperature: 23.5
Enter the afternoon temperature: 45.3
Enter the evening temperature: 34.6
Average temperature for the day: 34.46666666666667
Get Answers For Free
Most questions answered within 1 hours.