Question: Write a program that copies all lines from a file source.txt into the file destination.txt To answer the question, drag and drop the statements (below)

 Write a program that copies all lines from a file "source.txt"into the file "destination.txt" To answer the question, drag and drop the

Write a program that copies all lines from a file "source.txt" into the file "destination.txt" To answer the question, drag and drop the statements (below) to their correct position in the code (above). while not eof: except ValueError: f2.write(text) try: f2 = open("destination.txt","r") if text == ""; f2 = open("destination.txt","a") print("ERROR: No such file or directory") except IOError: eof = True f2 = open("destination.txt", "w") try: eof = False text = f1.readline() finally: f1 = open("source.txt", "r") f1.close() f2.close()

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!