1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
il63 [147K]
4 years ago
10

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 other variables -- k and total.temps = []
avg_temp = 0.0
total = 0.0

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

avg_temp = total/len(temps)

Computers and Technology
2 answers:
Anna35 [415]4 years ago
7 0

Answer:

temps = [10.2, 20.4, 30.0]

avg_temp = 0.0

total = 0.0

for k in temps:

   total += k

avg_temp = total/len(temps)

print(avg_temp)

Explanation:

- Create a list temps, that holds value for temperatures

- Initialize the average and total

- Initialize a for loop that iterates through the temps

- Add the values in temp to the total

- When the loop is done, calculate the average

- Print the average

suter [353]4 years ago
5 0

Answer:

temps = [23.4, 20.2, 19.5, 21.3, 18.7, 25.4, 24.9]

avg_temp = 0.0

total = 0.0

for k in temps:

 total += k

print("The total is \n", total)  

avg_temp = total/len(temps)

print("The average temperature is \n", avg_temp)

Explanation:

Using Python programming language

Create a list with seven values for daily temperature values (Its hard-coded to represent seven days of the week)

Declare and initialize to zero the variables avg_temp and total

Use a for loop to add elements of the list

Print the values

see attached code and output

You might be interested in
Whats the best way to get into a computers programming to get past firewalls
raketka [301]

you can use the software psiphon

6 0
3 years ago
Read 2 more answers
Which programming language is fortnite created in?
Ahat [919]

Answer:

Fortnite has been made by Epic Games with their own engine What is Unreal Engine 4 that is freely available to everyone. The cool thing about it is that it doesn't require a programming language to make games. Unreal Engine itself is made in C++, but developers mostly use its main feature, blueprints.

Muahahhahahhaha....................

3 0
3 years ago
Read 2 more answers
A good place to get hints about how to answer a response question could be a. Your teacher c. Both of these b. The rest of the t
Julli [10]

i'm assuming the answer would be c- both of these

5 0
4 years ago
Read 2 more answers
The severity of a burn or shock is not dependent on
Mariulka [41]

Hi Brainiac


The severity of a burn or shock is not dependent on the location or the distance from source


I hope that's help:0

5 0
3 years ago
A slide in Blake's presentation contained the following information:
deff fn [24]

Answer:

consistent phrasing is missing

Explanation:

If you will note carefully, the bullets are not in correct format. The model is missing. The correct one is as below.

Risks

The correct form of presentation is as below:

1. Risks

a. employees  

              a. physical illness

              b. mental illness

              c. death  

2. Customers  

              a.   complaints

              b.   downtime

3.  Benefits

However, the content seems to be complete now, and hence not anything else is required. And since its not something very tough to decide to go with, bite the bullet is certainly not an issue.  

3 0
3 years ago
Other questions:
  • AI vs IA like the difference
    12·2 answers
  • A system will always require what power connector?
    8·1 answer
  • PLEASE FILL IN THE BLANK FOR THESE POINTS!!!!!
    15·2 answers
  • What coding language should i begin with if i'm looking to get into AI ?
    11·1 answer
  • Your boss wants you to devise a way for remote contractors to be able to access the server desktop. There is one stipulation, ho
    12·1 answer
  • Part 3:<br> Please answer
    9·1 answer
  • Which of the following activities does an effective team do?
    15·2 answers
  • 1) a program that is designed to perform only one task.
    11·1 answer
  • Plz plz plz help me with me
    14·2 answers
  • What should you implement to leverage power, cooling, and networking capabilities independent from other datacenters in a region
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!