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
Before becoming romantically involved with a coworker you should
astra-53 [7]
You should make sure no one is looking and make sure you have protection
7 0
3 years ago
Read 2 more answers
Write the application of computer in education and communication​
daser333 [38]

Answer:

Technology has profoundly changed education in many ways. Technology has greatly expanded access to education. In medieval times, books were rare and only an elite few had access to educational opportunities. Individuals had to travel to centers of learning to get an education. Today, massive amounts of information (books, audio, images, videos) are available at one’s fingertips through the Internet, and opportunities for formal learning are available online worldwide through online learning, podcasts, traditional online degree programs, and more. Access to learning opportunities today is unprecedented in scope thanks to technology.

Technology is a gift of God. After the gift of life, it is perhaps the greatest of God's gifts. It is the mother of civilizations, of arts, and sciences. Technology has certainly changed the way we live. It has impacted different facets of life and redefined living. Undoubtedly, technology plays an important role in every sphere of life. Several manual tasks can be automated, thanks to technology. Also, many complex and critical processes can be carried out with ease and greater efficiency with the help of modern technology. Thanks to the application of technology, living has changed and it has changed for the better. Technology has revolutionized the field of education. The importance of technology in schools cannot be ignored. In fact, with the onset of computers in education, it has become easier for teachers to impart knowledge and for students to acquire it. The use of technology has made the process of teaching and learning all the more enjoyable.

Technology has also begun to change the roles of teachers and learners. In the traditional classroom, the teacher is the primary source of information, and the learners passively receive it. This model of the teacher as the “sage on the stage” has been in education for a long time, and it is still very much in evidence today. However, because of the access to information and educational opportunity that technology has enabled, in many classrooms today we see the teacher’s role shifting to the “guide on the side” as students take more responsibility for their learning using technology to gather relevant information. Schools and universities across the country are beginning to redesign learning spaces to enable this new model of education, foster more interaction and small group work, and use technology as an enabler.

Explanation:

7 0
3 years ago
Travis completes his assignments on a word processor. He wants to make sure that his documents are free from spelling or grammat
mrs_skeptik [129]

Answer:

C:F7 I TAKE COMPUTER CLASAES

3 0
3 years ago
Read 2 more answers
A spreadsheet program of a computerized version of _______
Romashka-Z-Leto [24]

the answer is "Paper-based Accounting"

8 0
3 years ago
Match the tool to the task it helps to accomplish.
olga2289 [7]

Answer:

Translate ➡️ allows the user to change words from one language to another

Smart Lookup➡️allows user to find the definition of a word or a phrase.

Thesaurus ➡️ allows the user to find the synonyms and antonyms of a word.

Explanation:

I have been able to match each took to the tasks that they perform.

In Translate, users can easily change words into a different language. That means that words in English can be translated into French, Spanish, etc., and vice versa.

In Smart Lookup, users can actually find definitions of words or phrases. Smart Lookup can be found in Microsoft Word Office.

The Thesaurus is used to find the synonyms and antonyms of words.

These tools make learning very easy and enjoyable.

8 0
3 years ago
Other questions:
  • Company A is setting up a network of mostly Windows machines. Which networking file system protocol would you recommend for maxi
    5·1 answer
  • A patent facilitates a government-approved technological monopoly by
    5·1 answer
  • What food does swiss eat on christmas?
    10·1 answer
  • 4-Translate the following C program to MIPS assembly program (Please explain each instruction in your code by a comment and subm
    6·1 answer
  • • Open your Netbeans IDE and answer the following question
    5·1 answer
  • What is the purpose of the operating system's processor management function?
    14·1 answer
  • I need help. I wanna help a friend by giving him my powerpoint but I dont want him to steal my work. Is their anyway to restrict
    8·1 answer
  • In science class, Patricia is giving a presentation on the different types of flowers in her community. As part of her presentat
    5·1 answer
  • 2) Please create a C program for the following: (25 points) a. Suppose the US dollar to Korean Won is 0.85 dollars to 1000 won.
    13·1 answer
  • Are all the computer users known as programmer ​
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!