Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a shell (text-based) program, called multiply_stuff.py, that opens a text file called stuff.txt with 3 numbers per line separated by commas. For each line

Write a shell (text-based) program, called multiply_stuff.py, that opens a text file called stuff.txt with 3 numbers per line separated by commas. For each line in the text file, the program should print out the result of multiplying the first and third numbers.

For example, if stuff.txt has the following lines:

500,55,2

300,45,3

200,7,10

Then the following example output would happen.

PS C:\Users\ssiva\Desktop> python multiply_stuff.py

1000

900

2000

PS C:\Users\ssiva\Desktop>

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Students also viewed these Databases questions

Question

Describe the sources of long term financing.

Answered: 1 week ago