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 area of study involves microeconomWhich area of study involves microeconomics? A. a nation's ability to meet consumer dema
AysviL [449]

Answer:

The correct answer is C. Consumer behavior and preferences.

Explanation:

hope it will help :)

6 0
3 years ago
If you could represent yourself with one object from your home what would it be ?
user100 [1]

Answer:

cross

bc im religous and stuff (0_0)

8 0
3 years ago
Read 2 more answers
NEED BY 15 MINUTES PLEASE! WILL MARK BRAINLIEST!You can create special effects in an image using a camera or a photo-editing too
vovangra [49]

Answer:

Special Lenses For Special Effects. ... These specialty lenses may be designed with movable focal planes for amazing depth of field, or built to focus extremely close to tiny subjects for macro enlargements, or even to produce a specific type of soft focus that's flattering for portraits

The meaning of photo editing is the act of altering an image, simply put. But that’s oversimplifying a subject which is quite complex.

For example, some photo editing techniques are done manually, while others are conducted through automated software. Some photo editing is even done offline, on actual photographs, posters or other printed collateral.

Other terms for photo editing:

Image editing

Post-processing

Image/photo manipulation

Photoshopping

Image/photo enhancement

Explanation:

so they both are alike because they can both be used to edit photos and both are great to use

3 0
3 years ago
Kamal plans to offer new, more favorable contracts to business customers who are now receiving a discount and use wireless servi
raketka [301]

Solution :

'AND" operation is a logical operation and is used in logical connective combining two statements and in truth tables.

Using AND operation verifies whether the outcome P and Q is true only when both the P as well as Q are true.  If one of the P or Q is not true, then outcome result will be false.

In the context, Kamal wishes to offer a new and more favorable contracts to the business customers who use a wireless services and receive a discount.

Therefore, using the AND operation of the customers as :

Customer     Wireless     Discount     Outcome

   A                   N                   N             FALSE

   B                   Y                   N             FALSE

  C                   N                   Y              FALSE

   D                   Y                   Y             TRUE

   

8 0
3 years ago
CPU BENCHMARKS are measurements used to compare performance between processors
Troyanec [42]

Answer:

The answer to this question is given below in the explanation section.

Explanation:

CPU benchmarks are used to picking the best CPU. If you want to pick the best CPU for the kind of work you do is easier if you research some performance benchmarks.

As you know, CPU benchmarks are measurements used to compare performance between processors. These benchmarks are the measure to know the performance of CPU.

These CPU Benchmarks are generated by running software programs specifically designed to push the limits of CPU performance.

3 0
3 years ago
Other questions:
  • Consider the following classes:
    8·1 answer
  • Any program that allows the user to select an item from a menu should ________ the user's selection.
    7·1 answer
  • How might writing an online journal be different than writing in a paper one ​
    15·2 answers
  • What are the four common tags used on webpages?
    11·1 answer
  • Can anyone fill in the space please
    6·1 answer
  • What major criteria must a product or process meet in order to be considered emerging technology?
    7·1 answer
  • What is the name given a technological program that typically copies itself and moves through a computer system in order to disr
    10·1 answer
  • What does the following loop do? val = 0 total = 0 while (val < 10): val = val + 1 total = total + val print(total)
    15·1 answer
  • Read each of the following statements about Computer Science and explain why you think that statement is true.
    9·1 answer
  • When you save a presentation with a .potx file extension, which type of powerpoint file is created?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!