Anthony B. answered 10/16/23
Software Engineer, Python/Java/Javascript with AI Background
Breaking the problem down into basic steps:
- Read each line from the file
- Start off the line counter at 1
- Read each number on the line to an array
- Convert the strings to integers
- Get the total sum of the line
- Get the numbers on the line
- Print out the data in the expected format
- Increment the line counter
- Restart from step 3 if there are additional lines in the file
Using Python3: