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
Your customer said that understanding the directions is difficult. This is an aspect of
Alexus [3.1K]

Answer:

Usability

Explanation:

The degree to which a program meets the needs of a user, including but not limited to learnability, reliability, and ease of use

7 0
3 years ago
A(n) ____________ is a program that translates a high-level language program into a separate machine language program.
Cerrena [4.2K]
A compiler is the program.
5 0
3 years ago
If you could design your own home, what kinds of labor-saving computer network or data communications devices would you incorpor
Kay [80]

Answer:

Access Points, Home Server, and Virtual Assistant/IOT connected devices

Explanation:

There are three main things that should be implemented/incorporated into your design and these are Access Points, Home Server, and Virtual Assistant/IOT connected devices. Access Points for Ethernet, and HDMI should be located in various important walls near outlets. This would allow you to easily connect your devices without having to run cables around the house. A home server will allow you to easily access your data from multiple devices in your home, and if you connect it to the internet you can access that info from anywhere around the world. Lastly, would be a virtual assistant with IOT connected devices. This would allow you to control various functions of your home with your voice including lights, temperature, and locks.

4 0
3 years ago
The system where the unit of measurement is centimeter
aleksklad [387]

Answer:

International System of Units

Explanation:

3 0
3 years ago
Write a program that has the user input how many classes they are taking this semester and then output how many hours they will
NeTakaya

wait i don't understand: "Write a program that has the user input how many classes they are taking this semester and then output how many hours they will need to study each week."

8 0
3 years ago
Read 2 more answers
Other questions:
  • What precaution can you take while using a social networking site to prevent a data breach?
    15·1 answer
  • A(n) _______ created in Microsoft Word or another word-processing program works well as a shell for a PowerPoint presentation.a.
    9·1 answer
  • How can you differentiate between standard and protocol? Write at least on example of each of these terminologies?
    12·1 answer
  • Through the use of a _____ system, information on prospective, current, and past customers is stored and analyzed for future pla
    15·1 answer
  • Which one of the following items is an example of software?
    12·2 answers
  • Write a Unix (Linux) find-like command (myFind) in Python3 where the function will return the full paths of all the files contai
    9·1 answer
  • Mrs. Schlair has an annual salary of $96,402.<br> a. What would her semimonthly salary be?
    9·1 answer
  • Help plz!! I will mark brainliest
    15·2 answers
  • Current flow is the same through all the elements of a series circuit.<br><br> true or false?
    15·1 answer
  • a data analyst is working with a spreadsheet that has very long text strings. rather than counting the characters themselves to
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!