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
Romashka-Z-Leto [24]
3 years ago
15

Create a function average_temp(s) that accepts a file name s that contains temperature readings. Each line in the file contains

a date followed by 24 hourly temperature readings in a comma-separated-value format, like this example:
2/3/2016,18,17,17,18,20,22,25,30,32,32,32,33,31,28,26,26,25,22,20,20,19,18,18,18

For each line in the file, the function should print out a line containing two items: the date, then comma, then the average temperature on that date, e.g.

3/5/2018, 58.24

3/6/2018, 60.11

3/7/2018, 57.55
Computers and Technology
1 answer:
Debora [2.8K]3 years ago
3 0

Answer:

def average_temp(s): f = open("s.txt","r") for line in f: myList = line.split(",") print(myList[0],end=",") t=0 for i in range(1,25,1): t += int(myList[i]) t /= 24 print(t) f.close()

def average_temp(s):

f = open("s.txt","r")

for line in f:

myList = line.split(",")

print(myList[0],end=",")

t=0

for i in range(1,25,1):

t += int(myList[i])

t /= 24

print(t)

f.close()

Explanation:

I used Python for the solution.

You might be interested in
And there you go <br> sorry its saying my thing is tooo small
zaharov [31]

Answer:

Global knowledge is the answer

6 0
3 years ago
Read 2 more answers
Which code snippet is the correct way to rewrite this in Semantic HTML?
xxMikexx [17]

Answer:

<div id="header">

<h1>Waketech</h1>

</div>

<header><h1>Waketech</h1></header>

Explanation:

I think thats the answer your welcome

8 0
8 months ago
Alex's woodworking shop is trying to design a web page with Cascading Style Sheets (CSS). Alex would like create the new design
guajiro [1.7K]

Answer:

1. C) Embedded Style

2. C) User Agent Style

Explanation:

1. Alex will use Embedded style to create styles that apply only to the HTML document that the style was created. With Embedded styling; the rules can be embedded into the HTML document using the <style> element.

2. Since Alex has forgotten to give any style for all of his pages, the style that will be applied to his pages is User Agent Style. User Agent Style is the default style of a browser. The browser has a basic style sheet that gives a default style to any document and this style is called User Agent.

8 0
2 years ago
Which operating system is used by most the supercomputer system in the world
DENIUS [597]

Answer:

Linux

Explanation:

Linux runs all of the top 500 supercomputers

3 0
2 years ago
What are threats to computer system
4vir4ik [10]
Breach..
bugs and viruses
hack
3 0
3 years ago
Read 2 more answers
Other questions:
  • You know a Linux command will perform a desired function for you, but you cannot remember the full name of the command. You do r
    14·1 answer
  • Which statement is true of Web-based electronic data interchange (Open EDI)? a. It consists of international agreements on priva
    7·1 answer
  • Apart from confidential information, what other information does NDA help to outline?
    15·1 answer
  • One of the first signals that an organization is making progress in the development of its IR program, specifically in the devel
    6·1 answer
  • "Which NET command is used on a Windows PC to establish a connection to a shared directory on a remote server?"
    11·1 answer
  • Define Agricultural Era
    14·2 answers
  • Which software manages the functioning of the entire computer system<br>​
    7·2 answers
  • Your friend decides to create a spreadsheet containing vocabulary terms and their definitions to help prepare for the unit test
    5·1 answer
  • NAT addresses concerns over the dwindling IPv4 address space by ___________________. 1 point allowing networks to use fewer IP a
    15·1 answer
  • an existing technology that would allow users to transfer images from the camera to the computer without connecting them
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!