Question: This program will help you practice the process of reading the obstacles file (see the Twine spec). This program must read a single input from

This program will help you practice the process of reading the obstacles file (see the Twine spec). This program must read a single input from the user; it will always be a file name (unlike Twine, it will never be -). Attempt to open the file; dont make a loop, just try once. Use a try/except to detect the possibility that the file might not exist (since I might give you a faulty filename), but if it fails, just end the program with the message: ERROR: File not found. Assuming that the file exists, read its lines. (A for loop would be handy here.) The files will have the same format as described for the obstacle files in Twine. To simplify this problem, you may assume that there are no input errors, and also that there are no duplicate values. Save all of the (x, y) pairs that you read from the file. When youre done, sort them all, and print them out, one per line. python please

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!