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
netineya [11]
3 years ago
15

Write a function named average_value_in_file that accepts a file name as a parameter and reads that file, assumed to be full of

numbers, and returns the average (mean) of the numbers in that file. The parameter, filename, gives the name of a file that contains a list of numbers, one per line. You may assume that the file exists and follows the proper format. For example, if a file named input.txt contains the following numbers
Computers and Technology
1 answer:
noname [10]3 years ago
6 0

def average_value_in_file(filename):

   f = open(filename)

   total = 0

   count = 0

   for x in f.read().splitlines():

       total += int(x)

       count += 1

   return total/count

print(average_value_in_file("input.txt"))

I used an input file that looks like this:

1

1

1

1

You might be interested in
Select the correct answer.
VARVARA [1.3K]

Answer:

D

Explanation:

It is D

Select the correct answer.

Identify the correct CSS syntax to link an external style sheet.

6 0
3 years ago
Help on What i should say to my IT school lady? Read all three pages
avanturin [10]

Answer:

if you were to rest my would I still be able to have all my stuff that I have done if so I think you could reset it for me

hope this helps

have a good day :)

Explanation:

4 0
3 years ago
The SETI (Search for Extraterrestrial Intelligence) project collected vast amounts of data that needed processing. SETI was one
I am Lyosha [343]

Answer:

grid computing

Explanation:

Based on the information provided within the question it can be said that this technology is typically known as grid computing. Like mentioned in the question, this is a type of processor architecture in which various computer resources are combines from different domains in order to work together towards a common main objective. Which is exactly what SETI has done by using many individual's computers to essentially create one supercomputer capable of handling all the data.

6 0
4 years ago
What symbol does access use to the left of a record when it is currently being edited and is therefore locked so that other user
dedylja [7]

Answer: It is a non-existing keyword or symbol in access

Explanation:

8 0
2 years ago
PLEASE HELP ASAP!!!!111 Read "Teenagers are rewriting the rules of the news" (find it somewhere and answer questions below)
Ilya [14]

Answer:

Sorry, we picked up your question late. There are a lot of questions, and every now and then some misses out. And I am sure you will understand. However, the cool thing is your answers are correct. I read the complete article on young adults or teenagers and found the same. And I am sure you will agree with the facts, and use its best meaning in your own life. I am, however, listing below all the answers for your complete satisfaction. And I congratulate you, you are up with the correct list of answers.

The answer to the First question is:

B. the description of how influencers follow young social media users"

Second question answer is

C. Andrew Yang

And the third question answer is:

C. Teens and young adults consume and spread news information through social media.

And I am sure you must have liked this article. Article reading is a good habit. You should always start a day by reading one article online or in newspaper.

Explanation:

Please check the answer section.+

4 0
3 years ago
Other questions:
  • Passing structured query language commands to a web application and getting the website to execute it is called SQL script:_____
    12·1 answer
  • Suppose sum and num are int variables, and the input is 18 25 61 6 -1
    11·2 answers
  • Public class Robot
    15·1 answer
  • Which kind of system software tells the computer how to communicate with peripherals, such as a prero
    6·2 answers
  • What is the purpose of a report?
    14·1 answer
  • Describe the following types of Cloud services:
    11·1 answer
  • What will be the results from running the following code?
    5·1 answer
  • What is one of the benefits of using a library in a program?
    5·1 answer
  • state how to transfee information from website to el processing document in computers and technology.​
    12·1 answer
  • In java complete a program that takes a weight in kilograms as input, converts the weight to pounds, and then outputs the weight
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!