← Back to Files
Question 426
One Number Per Line
One Number Per Line
Input: one line of whole numbers separated by spaces, no prompt. Split the line with split() and write each piece to numbers.txt on its own line. Then read the file back line by line, converting every line with int(), and print two lines: Total: <sum> and Lines: <count>, where the count is the number of lines read from the file.
Expected Output:
Total: 43 Lines: 4
= newline. The output ends with a newline — print one after the last line.
Hints3 available
Sign in to use hintsTopics:
Files
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Ctrl+Space to expand shortcuts (pr, inp, def)
Your Output
Run your code to see the output here...
Test Cases
Run your code to see test case results.