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
Marianna [84]
3 years ago
8

Write a shell (text-based) program, called sum_second.py, that opens a text file called stuff.txt with 2 numbers per line separa

ted by commas and prints out the sum of the second numbers on every line. For example, if stuff.txt has the following lines: 500,55 300,45 200,7 400,20 Then the following example output would happen. PS C:\Users\ssiva\Desktop> python sum_second.py Sum: 127 PS C:\Users\ssiva\Desktop>

Computers and Technology
1 answer:
Ivanshal [37]3 years ago
6 0

Answer:

See explaination for the program code

Explanation:

The Programming code:

inFile = open("stuff.txt", "r")

num = []

Sum = 0

for val in inFile.readlines():

value = val.split(",")

Sum = Sum + int(value[1])

print("Sum of second number on every line in the file is: ", Sum)

inFile.close()

Please kindly check attachment for output

You might be interested in
Graded Assignments may be found at the end of each chapter of the required textbook under the title "Real-World Exercises". Each
mina [271]
Ok chapter 2 be done by 11:59
5 0
3 years ago
The rubric given to them by their teacher requires that
Arte-miy333 [17]

Answer:1:navigate to the paragraph command group

2:Click the line and paragraph spacing option

3:Click the space required

Explanation:

3 0
2 years ago
What method does a GSM network use to separate data on a channel?
Sergeu [11.5K]

Answer: TDMA(Time division multiple access)

Explanation: Time-division multiple access is the method that is used by GSM(Global system for mobile communication) usually for the separation process of the data.It is a way in which a same frequency is shared by different time slots of signal.It has high flexibility and so thus is helpful for the GSM network and provides easy services of division.It divides the data according to the time period slots in a GSM network.

4 0
2 years ago
When you create an internal hyperlink, you create the link that points to the bookmark using the anchor tag with which attribute
abruzzese [7]
You use the href attribute. <a href="apage.html"> My Page</a>
7 0
3 years ago
Number the steps to describe how Tristan can complete
Lemur [1.5K]

Answer:

  1. Cut the Television and related equipment row.
  2. Click the plus sign on the left side of the table between  the last two rows.
  3. Paste the Television and related equipment row.

Explanation:

In order to move the row, Tristan should first select the row and then cut it. This will ensure that the row will be moved completely instead of copied.

Tristan should then hover with the mouse between the last two rows and click on the plus sign on the left side. It will add a new row to the sheet. between the last two rows.

Tristan should then select the topmost cell and click paste. The television row will be pasted there and Tristan would have successfully moved it.

4 0
3 years ago
Read 2 more answers
Other questions:
  • Plz tell me a storage device that should be used for this and why
    11·1 answer
  • _____________ is the characteristic of a resource that ensures that access is restricted to only permitted users, applications,
    14·1 answer
  • Contemporary operation of networking technology is possible only through the usage of open-use technology and layering approache
    13·1 answer
  • A software program that includes tools for entering, editing, and formatting text and graphics is called a word processing progr
    14·1 answer
  • Write a program that takes a point (x,y) from theuser and find where does the point lies. The pointcan
    8·1 answer
  • Help!!
    15·1 answer
  • Because of the internet, travel agents now focus more on computers than they do on customer relationships.
    6·2 answers
  • Which game would you play info you were competitive?
    13·2 answers
  • Emily is deciding whether to buy the same designer jacket her friends have. The jacket is much more expensive than a similar one
    8·2 answers
  • With _____ technology, a web server delivers information to users, who have signed up for the service, instead of waiting for th
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!