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
What port number is the web server listening on for the web request?
Veronika [31]
80 for HTTP, 443 for HTTPS
8 0
3 years ago
Similarities between human and computer​
Zielflug [23.3K]

Answer: Both have a center for knowledge; motherboard and brain. Both have a way of translating messages to an action. Both have a way of creating and sending messages to different parts of the system.

5 0
3 years ago
Write the definition of a function minMax that has five parameters. The first three parameters are integers. The last two are se
guapka [62]

void minMax(int a, int b, int c, int*big, int*small)

{

if(a>b && a >c){

*big = a;

if(b>c)

*small = c;

else

*small = b;

}

else if (b>a && b>c){

*big = b;

if(a>c)

*small = c;

else

*small = a;

}

else{

*big = c;

if(a>b)

*small = b;

else

*small = a;

}

}

8 0
2 years ago
Which tool is often used by devops to facilitate the development, testing, and deployment of new software?.
ella [17]

The Jenkins tool is often used by DevOps to facilitate the development, testing, and deployment of new software.

<h3>What is software development?</h3>

The practice of conceptualizing, planning, designing, coding, documenting, testing, and bug-fixing that went into building and maintaining applications, platforms, or other software modules is known as software creation.

Jenkins is a Java-based continuous integration/continuous delivery and deployment system that is free and open-source.

Thus, the Jenkins tool is often used by DevOps to facilitate the development, testing, and deployment of new software.

Learn more about software development here:

brainly.com/question/3188992

#SPJ4

3 0
1 year ago
4. True or False: In order to use wi-fi signal/network, you have to remain seated in one spot.
gizmo_the_mogwai [7]

Answer:

4. flase

5. true

Explanation:

If your getting wifi signal on your phone right now while where running in your house or traveling through the kitchen, you don't have to sit in one spot.

I tried doing that with another phone but It didn't work... :(

5 0
3 years ago
Other questions:
  • Var cookie = "username=mike2009";
    10·1 answer
  • By generating and delivering timely and relevant information supported by networks, _____ creates new opportunities for conducti
    15·1 answer
  • Jose wants to be sure maintains a high credit score as he is planning yo buy a new car soon what should he do to ensure his scor
    13·2 answers
  • Routing connects different network segments and decides where __________are sent to
    7·1 answer
  • The problem with the media giving equal air time to those who are __________ about the effects of media violence on violent beha
    9·1 answer
  • Press the _______ key to move to the next cell in a row.
    5·1 answer
  • Joe a frequent visitor to a branch office attempts to connect his tablet to the office wireless network but is unable to connect
    14·1 answer
  • How would a barcode reader be used in a healthcare industry?​
    6·1 answer
  • Gary says, "Ports are where data enter a network before reaching a gateway. The data travel via transmission
    10·1 answer
  • In the bremmer article, the author states that _________ translates into greater risks.
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!