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
Which of the following is an example of new and emerging classes of software?
Rama09 [41]
The answer is Smart technology :)
4 0
2 years ago
When using linear or reciprocal navigation, what should be the interface include?
Alex_Xolod [135]
The answer to the question is A
5 0
3 years ago
Describe the basic features of the relational data model and discuss their importance to the end user and the designer. Describe
Mandarinka [93]

Answer:

The answer to this question can be described as follows:

Explanation:

Relational data model:

The use of data tables to organize sets of entities into relationships requires a relational data model. this model work on the assumption, which is a primary key or code, that is included in each table configuration. The symbol for "relational" data links and information is used by other tables.

Model Design:

This model is used for database management, it consists of structure and language consistency. It is design in 1969.

Importance of data model:  

This provides a common standard for processing the potentially sound data in machines, that was usable on almost any one device.  

Big Data:

It moves to locate new and innovative ways to handle large volumes of authentication tokens and to gather business insights when offering high efficiency and usability at an affordable cost at the same time.

6 0
3 years ago
Uses of prototype and who made the prototype<br>​
myrzilka [38]

Answer:

A prototype is an early sample, model, or release of a product built to test a concept or process. It is a term used in a variety of contexts, including semantics, design, electronics, and software programming. A prototype is generally used to evaluate a new design to enhance precision by system analysts and users.

Explanation: The place that made prototype was Radical Entertainment.

Hoped this helped.

3 0
3 years ago
When comparison shopping, all of these hint at a good deal EXCEPT_____________________.
pav-90 [236]

Answer:

lower-priced models offer more features

Explanation:

4 0
3 years ago
Other questions:
  • If an ARQ algorithm is running over a 40-km point-to-point fiber optic link then:
    12·1 answer
  • what has become an established maritime commerce Center and one of the largest cities in the United states ​
    11·1 answer
  • A matrix representation stores matrices such that the offset address of the element in row i and column j can be calculated by c
    12·1 answer
  • Outcomes resulting from using incorect requirement specification during system development​
    11·1 answer
  • Two samples of dirt are collected from a suspect's tread in his shoe and a crime scene. The forensic investigator does a gross e
    6·2 answers
  • Consider a channel that can lose packets but has a maximum delay that is known. Modify Protocol rdt2.1 to include sender timeout
    11·1 answer
  • You are required to write a calculator for Geometric shapes(Circle, Square, and Rectangle). The basic idea is that you willprovi
    7·1 answer
  • Digital cameras always create great photographs. <br>True <br>False
    14·2 answers
  • Given the scenario, before leaving the office, you ask the CIO to provide which formal document authorizing you to perform certa
    11·1 answer
  • What is the effect of persistence of game worlds in social video games?
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!