Question: Write a shell (text-based) program, called sum_all.py, opens a text file called stuff.txt with 1 number per line and prints out the sum of all
Write a shell (text-based) program, called sum_all.py, opens a text file called stuff.txt with 1 number per line and prints out the sum of all the numbers (no matter how long the file is).
For example, if stuff.txt has the following lines:
100 300 200
Then the following example output would happen.
PS C:\Users\ssiva\Desktop> python sum_all.py Sum: 600 PS C:\Users\ssiva\Desktop> |
Submit the file sum_all.py when done.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
