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]
3 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]3 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]3 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
Social media first became popular due to which development?
kvv77 [185]
I think it's A because it sounds more reasonable
5 0
1 year ago
The _______ contains the most commonly used commands.
expeople1 [14]
The quick access toolbar contains the most commonly used commands.
8 0
3 years ago
Read 2 more answers
Demand is created through meeting customer buying criteria, credit terms, awareness (promotion) and accessibility (distribution)
tankabanditka [31]

Answer:

Bell

Explanation:

In the given case the product that has the highest Dec. Cust. Survey score will be treated as most competitive at the end of last year. Based on the information provided in the "Top Products in Thrift Segment" table, we can conclude that Bell has highest score for Dec. Cust. Survey score which stands at 31.

Please see attachment for the product list we referenced to as non was given.

7 0
2 years ago
Why is computer called information processing machine....?​
mixer [17]

Answer:

Since the computer accepts raw data as input and converts into information by means of data processing

Explanation:

helping!!!

3 0
1 year ago
Read 2 more answers
Jody should select the
Alex Ar [27]

Answer:

In the View tab, you will find Zoom Option. Set the Zoom level to 100%.

Explanation:

You need to set the Zoom level to 100%, And you can do this, by setting the zoom level to 100%, from the scroll bar. Or you can move to view tab in the main menu, and then in the Ribbon, you need to select the zoom % and set it to 100 percent. You will then be able to see the entire page. And if you want, you can increase the Zoom level to even further, for getting an even more clearer picture.

3 0
3 years ago
Other questions:
  • A restaurant has a case type that allows customer to book the dining room for events. Customers provide basic information includ
    7·1 answer
  • Which best describes the differences between a resume and a CV?
    13·2 answers
  • Why when I move stuff in Roblox Studio like an object or a Character. It tilts the opposite direction I'm moving it to with the
    6·2 answers
  • A port is the point at which a peripheral device attaches to or communicates with a computer or mobile device. True False
    15·1 answer
  • Two employees were very different in terms of​ age, gender, and other demographic data but they shared a common love of dogs and
    8·1 answer
  • To gain a competitive edge this year, the upper management of a global IT company has decided to focus on customer service, empl
    13·1 answer
  • Numerical methods are implementations of mathematical algorithms, but constructed with special consideration for accuracy of sol
    7·1 answer
  • If you delete a conversation many times with someone like this, will you stop receiving messages from them?
    13·1 answer
  • Which of the following keywords allows a subclass to access a superclass method even when the subclass has overridden the superc
    9·1 answer
  • What is the difference between turn-based game mode and point-based game mode?
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!