Python Code for this program,
Copy/paste & Download/upload disallowed in code editor
Replace a specified line in a file - clone Replace a specified line in a file and print the updated file
Compiler: Python 3 (python3.5.2)
Perform the following operations:
- Read the console input and create a file.tot. $ in the console input is considered as an end of content for a file.
- Close the file.
- Replace the specified line number from the file with provided content
RUN
solution.py
entrypoint.z
Write you
Input:
Music is like a dream. Without music, life would be a mistake
I can chase you, and I can catch you, but there is nothing I can do to make you mine
wings to the mind, flight to the imagination and life to everything.
+ Add Custom Test Case
where:
Lines up to $ indicate a file content.
First line after $ indicates a line number to be replaced.
Second line after $ indicates a content to be replaced with at specified line.
OPPPPT
CODE REVIEW
COMMENT
Output:
Music is like a dream.
Music gives a soul to the universe, wings to the mind, flight to the imagination and life to everything.
+ Test Case(s)
+ Grading Criteria