Question: I need help writing this code in python. The Problem Northwests Facility Services would like your help in gathering the current temperature readings from each

I need help writing this code in python.

The Problem

Northwests Facility Services would like your help in gathering the current temperature readings from each day on campus.

You are to write a program that will assist them in maintaining the temperature data. You will use a list to store each temperature reading. The list elements will be used to store the readings for each day.

Your Task:

Your instructor is very particular regarding how this assignment will be completed so you must follow the guidelines listed below exactly.

The goal of this project is to allow Facility Services to:

Calculate the average temperature for the week.

Determine the number of temperatures above and below the average

Determine the maximum temperature and the minimum temperature

Write a value-returning function called findAverageTemperature that takes in the list as a parameter, and calculates the average temperature using the values that have been entered into the list. Store the average in an appropriate variable. The function should return the average. DO NOT USE THE BUILT-IN METHOD sum() IN YOUR SOLUTION. YOU WIL LOSE POINTS.

Write a non-value returning function named temperatureAboveAndBelow that has 2 parameters, the list and the average. The function should determine and display the number of days above and below the average temperature. This loop must be accomplished using a for loop. Use the if else control structure within the for loop to determine the number of days above and below, as well as the maximum and minimum temperatures. DO NOT USE THE BUILT-IN FUNCTIONS min() OR max() IN YOUR SOLUTION. YOU WILL LOSE POINTS.

MAIN PROGRAM:

You will need to declare a constant variable in the main program. It will be assigned the set number of days. (NO_OF_DAYS=7). There will be 7 days.

Input the temperature for each day and store them in a list. This task must be accomplished using a for loop.

Allow Facility Services to change the temperature for a particular day and update the average temperature. This loop must be accomplished using a while loop.

Sample runs of the program are shown below. (User input is shown in bold)

Example Sample run #1

Enter each temperature below: Day 1: 45.67 Day 2: 32.22 Day 3: 38.76 Day 4: 30.11 Day 5: 28.56 Day 6: 36.77 Day 7: 33.78 The average temperature is: 35.12 Number of days above the average temperature: 3 Number of days below the average temperature: 4 The highest temperature is: 45.67 The lowest temperature is: 28.56 Do you want to change a temperature? 1: yes 2: no: your choice: 1

Enter which day you would like to change 1 - 7: 3 Enter new temperature data: 38.65 Do you want to change a temperature? 1: yes 2: no your choice: 2

The average temperature is: 35.11 Number of days above the average temperature: 3 Number of days below the average temperature: 4 The highest temperature is: 45.67 The lowest temperature is: 28.56

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!