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
lapo4ka [179]
3 years ago
9

"A file named numbers.txt contains an unknown number of lines, each consisting of a single integer. Write some code that compute

s the sum of all these integers, and stores this sum in a variable name sum."
Computers and Technology
1 answer:
satela [25.4K]3 years ago
7 0

Answer:

Following are the program in the Python Programming Language.

#declare variable and initialize to 0

sum = 0

#read the following file

file = open('numbers.txt', 'r')

#set the for loop

for n in file:

  #convert the file string into the integer and perform sum.

  sum += int(n)

Explanation:

<u>The following are the description of the program</u>.

  • Firstly, declare variable 'sum' and initialize the integer type value i.e., 0.
  • Set the variable 'file' that only read the following file text i.e., 'numbers.txt'.
  • Set the for loop that read the content of the file and store in the variable 'n' one by one.
  • Finally, er convert the following string in to the integer and perform the addition.
You might be interested in
Now you are ready to implement a spell checker by using or quadratic. Given a document, your program should output all of the co
Harlamova29_29 [7]

Answer:

Sorry po idont know po ehhh sorry

5 0
3 years ago
An information system can enhance core competencies by
Nutka1998 [239]

Answer:

An information system can enhance core competencies by: encouraging the sharing of knowledge across business units.

Explanation:

Hope this helps you ! please mark me brainless

4 0
3 years ago
What is “GoF” and how does it relate to design patterns?
tatuchka [14]

Answer:

GOF refers to the gang of four pattern that are generally consider the basic for all the other patterns. Design pattern are basically provide the solution to the software design to resolve all problems that are associated with the development of real world applications.

GOF Design pattern implemented the parts of the re-usable object oriented software applications. The main aim of design pattern is to pass all the structural design pattern. Design pattern is the most powerful and helpful tool for the software developer and architecture.  

3 0
3 years ago
In five to ten sentences, explain what netiquette is and how it improves efficiency and productivity in the workplace.
dlinn [17]

Netiquette is a form of communication done correctly online. Good netiquette involves respecting others privacy, using correct grammar, and not doing anything online that will annoy or disrupt others. It is important to have netiquette while online, because communication online is non verbal and you can’t tell how someone is reacting. Having netiquette is important. It implies that you have polite behaviors, and want to build up relationships with people in your work space or at a party you plan on attending. Netiquette is one way to show respect to a person, and to show that you deserve respect. It improves how you organize your writing, and shows how productive you can be. By helping you to become polite online and respectful to other users of the internet, Netiquette is especially important for future letters, emails, or other writing forms.


4 0
3 years ago
Read 2 more answers
What appears in the document after you have inserted a video?
Nitella [24]

Answer:

text with a hyperlink to the video website

Explanation:

documents do not auto-upload thumbnails or embedded videos for playback, so external links are pasted there

6 0
3 years ago
Read 2 more answers
Other questions:
  • When the minnesota timberwolves encouraged facebook fans to post a great shot of a dunk onto its pinterest page for a chance to
    6·1 answer
  • How were the pages made to create the Book of Kells? a. Scribes prepared the papers using a printing press. b. 185 calves were s
    9·1 answer
  • An OS X backup utility that automatically backs up files to a dedicated drive that is always available when the computer is turn
    6·1 answer
  • The part of the computer that provides access to the internet is the?
    14·1 answer
  • What part of a check is the LEAST important?
    14·2 answers
  • If you go over 255 in RGB by 1 does it reset to 0 or 1
    11·1 answer
  • Many businesses use robotic solutions. Which department of the food and beverage industry uses robotic solutions on a large scal
    10·2 answers
  • What is the volume of a rectangular prism with a length of 812 centimeters, width of 913 centimeters, and a height of 1225 centi
    12·1 answer
  • Most effective way of closing email is<br>​
    7·2 answers
  • Moving images of real event​
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!