subject

Given a variable temps that refers to a list, all of whose elements refer to values of type float , representing temperature data, compute the average temperature and assign it to a variable named avg_temp . besides temps and avg_temp , you may use two othervariables -- k and total .

my solution below didn't work. i wonder how to go about this problem.

temps = []

avg_temp = 0.0
total = 0.0

for k in range(temps):
total += k

avg_temp = total/len(temps)

ansver
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 09:30, nsjcbdhcb
Light travels at a speed of 186,000 miles a second. the distance light travels in a year is 5,865,690,000,000 miles/year 5,865,695,000,000 miles/year 58,656,950,000,000 miles/year 6,789,000,0000 miles/year
Answers: 1
image
Computers and Technology, 23.06.2019 11:00, la200564
How should you specify box sizes on a web page if you want the boxes to vary according to the font size of the text they contain? a. in pixels b. in inches c. as percentages d. in em units
Answers: 2
image
Computers and Technology, 23.06.2019 16:30, mirmir62
Which of the following is not an enhancement to the standard wiki to make it more attractive for corporations? encryptionwork spacespermission toolspredictive text
Answers: 2
image
Computers and Technology, 23.06.2019 17:00, ayoismeisjjjjuan
The camera still is bad even with the new iphone xr and especially in low light it is even worst because you can see the pixels more if its in low light. if all you apple customers want apple to fix this then lets fill there feedback with complaints about the can apple do to fix this issue?
Answers: 1
You know the right answer?
Given a variable temps that refers to a list, all of whose elements refer to values of type float ,...

Questions in other subjects: