← Back to Files
Question 421
Append To The Log
Append To The Log
The write step creates log.txt holding the single line started, and an entry is then read from input. Open the file in append mode ("a") and write the entry followed by a newline, so the first line stays; the read-back and the print of the whole file are already in place and should show both lines. Input: one line, no prompt.
Expected Output:
started saved file
= newline. The output ends with a newline — print one after the last line.
Hints2 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.