Answer:
#section 1
<em>no_of_days= int(input('How many days are we geting the average for: '))
</em>
<em>tem=[]
</em>
<em>for i in range(no_of_days):
</em>
<em> a= int(input('Enter temperaure: input ' + str(i+1)+' :'))
</em>
<em> tem.append(a)
</em>
<em />
#section 2<em>
</em>
<em>average = round(sum(tem)/len(tem),2)
</em>
<em>print('The Average is ',average)
</em>
<em>gdays=[]
</em>
<em>for i in tem:
</em>
<em> if i > average:
</em>
<em> gdays.append(i)
</em>
<em>
</em>
<em>print('The following days are greater than the average: ',gdays)</em>
Explanation:
The above code is written in python 3
#section 1:
An input is gotten for number of days that is to be used in the calculation, and an array is created to hold the temperature that will be inputted into the program.
A range of values from [0 - (no_of_days - 1)] is created from the number of days entered, this is done so that the FOR loop can iterate through every number and call for inputs.
The FOR loop prompts the user for an input based on the range and passes that input to an integer data type before appending it to the tem array.
#section 2:
The sum of the new list and the length is used to calculate the average and the it is rounded up to 2 DP, The average is then printed to the screen.
Another FOR loop is used to check which of the days are greater than the average and passes it to another array (<em>gdays)</em>, this array is also printed to the screen.
check the attachment to see how the code works.