(Solved) : Maze Traversal Following Grid Representation Maze Symbols Represents Walls Maze Periods R Q37215558 . . .

Maze Traversal: The following grid is a representation of a maze. 蠫#: The , symbols represents the walls of the maze, and the periods (.) represent squares in the possible path through the maze. S is the starting location (Start) and E is the ending location (Exit) – they can be located anywhere on the outer walls. There is a simple algorithm for walking through a maze that guarantees finding the exit (if there is an exit). If there is no exit, you will arrive at the starting location again. Place your hand on the wall to your right and begin walking forward. Never remove you hand from the wall. If the maze turns to the right, you follow the wall to the right. As long as you do not remove your hand from the wall, eventually you will arrive at the exit of the maze. There may be shorter path than the one you have taken, but with this algorithm, you are guaranteed to find your way out of the maze Write a Python program that will get you out of a maze similar to the above pictured maze. Your program must read the maze from a file. Organize your program for easy debugging and understanding using functions, lists and other features of the Python programming language to accomplish the task. Print out the maze after each step has been taken and mark each current position with the letter x and the previously visited positions with a period (G) Test your program for the case where there is an exit and for the case where this is no exit (in which case you will end up back at the starting location) Show transcribed image text Maze Traversal: The following grid is a representation of a maze. 蠫#: The , symbols represents the walls of the maze, and the periods (.) represent squares in the possible path through the maze. S is the starting location (Start) and E is the ending location (Exit) – they can be located anywhere on the outer walls. There is a simple algorithm for walking through a maze that guarantees finding the exit (if there is an exit). If there is no exit, you will arrive at the starting location again. Place your hand on the wall to your right and begin walking forward. Never remove you hand from the wall. If the maze turns to the right, you follow the wall to the right. As long as you do not remove your hand from the wall, eventually you will arrive at the exit of the maze. There may be shorter path than the one you have taken, but with this algorithm, you are guaranteed to find your way out of the maze Write a Python program that will get you out of a maze similar to the above pictured maze. Your program must read the maze from a file. Organize your program for easy debugging and understanding using functions, lists and other features of the Python programming language to accomplish the task. Print out the maze after each step has been taken and mark each current position with the letter x and the previously visited positions with a period (G) Test your program for the case where there is an exit and for the case where this is no exit (in which case you will end up back at the starting location)
Expert Answer
Answer to Maze Traversal: The following grid is a representation of a maze. 蠫#: The , symbols represents the walls of the maze, …
OR