← Back to Files
Question 414
Copy Then Show
Copy Then Show
Two lines read from input are written to source.txt. Open source.txt for reading and read all of it with f.read() into text, write text into copy.txt with write, then (the read of the copy into lines is given) print each line of the copy with end="" so it appears unchanged and finally print <n> lines copied with the number of lines. Input: two lines, no prompt.
Expected Output:
line one line two 2 lines copied
= 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.