Computers and Technology
Computers and Technology, 05.02.2020 21:42, MaeWolfe

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)

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 24.06.2019 08:00, nataliamontirl4230
Java the manager of a football stadium wants you to write a program that calculates the total ticket sales after each game
Answers: 1
image
Computers and Technology, 24.06.2019 21:50, TamB01
Maddie is traveling to india and would like to document her trip for friends and family to access online. what tool would be best? app blog listserver web page
Answers: 1
image
Computers and Technology, 24.06.2019 22:30, toricepeda82
What are the 4 basic items that are traded throughout the world?
Answers: 1
image
Computers and Technology, 24.06.2019 23:40, Salamonti
Which slide should you change so it reflects om all sides of your presentation
Answers: 1
Do you know the correct answer?
Given a variable temps that refers to a list, all of whose elements refer to values of type float ,...

Questions in other subjects:

Konu
History, 10.03.2021 16:50
Konu
Health, 10.03.2021 16:50
Konu
Mathematics, 10.03.2021 16:50
Konu
Mathematics, 10.03.2021 16:50