Question: This program will model the interactive commands that you will use in the Twine problem (see that spec for details). However, in this program, it

This program will model the interactive commands that you will use in the Twine problem (see that spec for details). However, in this program, it will be vastly simplified. Dont ask for an obstacles file, and dont print any prompts; also, you dont need to track the history. Instead, simply support 4 commands: n,e,s,w. Track the position of the player after every command as an (x,y) tuple, and print it out before waiting for the next command. You will, however, have to use try/except (see the Twine spec) to protect yourself against EOFError. Make sure to use a while loop with input() and try/except, or you will lose points. 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!