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
What is the 5 basic steps of computer programing?
arsen [322]
1. Learning Languages such as C+, VB, etc.
2. Gather data, proficient websites that will come to your need.
3. Install certain softwares to see it in action.
4. Do lots and lots of studying and research.
5. Ask for help, the Internet is here.
7 0
2 years ago
Identify the correct sequence of steps to change the font from Verdana to Arial.
Luden [163]
Go to your text and scroll until you find your preferred text
3 0
2 years ago
For businesses and organizations under recent compliance laws, data classification standards typically include private, confiden
Anon25 [30]

Answer:

True is the correct answer for the above question.

Explanation:

  • To secure the data is the first rule for any organization because when the data is lost or unsecured the whole system can have the problem.
  • If any person wants to hack the system or any organization then they first choose to hack the data of the system.
  • So there is a Hundred of law in the US taken by the US government at the Federal trade commission act to secure the data of the organization.
  • The above question also states the same which is defined above. Hence It is a true statement.
6 0
3 years ago
Average of Grades - Write a program that stores the following values in five different variables: 98, 87, 84, 100, 94. The progr
liubo4ka [24]

Answer:

Not sure what language, but in python a super basic version would be:

val1 = 98

val2 = 87

val3 = 84

val4 = 100

val5 = 94

sum = val1 + val2 + val3 + val4 + val5

avg = sum / 5

print(avg)

Explanation:

4 0
3 years ago
Q: Why can't I log in to Brainly
algol13

Answer:

yes you are probably on a school Chromebook

Explanation:

5 0
3 years ago
Other questions:
  • Maya enjoys connectedWith her friends and social media apps but one of her friends post a lot of stuff that my thinks it’s annoy
    14·1 answer
  • Explain how Deep Packet Inspection works (DPI). How is this technology beneficial to Perimeter Security? Lastly, describe a scen
    6·1 answer
  • When you purchase software in a box, reading the ________ is important to know if the software will function properly?
    13·1 answer
  • Jonathan works with a team of graphic designers. They have a collection of images and have divided the image editing work among
    5·2 answers
  • Which of these is an example of rebranding ?
    6·2 answers
  • In what way, if any, has community building changed in the age of digital media? People’s community building has not changed in
    13·1 answer
  • Write two example use of relationships ICT
    11·1 answer
  • Explain the concept of conditional formatting​
    9·1 answer
  • Software piracy is acceptable as it helps us obtain software cheaper or sometimes even for free.
    11·2 answers
  • CODEHS: WHY is it important to know the difference between div and span?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!