QUIZ 9 COMP9021 PRINCIPLES OF PROGRAMMING $ python3 quiz_9.py Enter an integer: 0 Here is the grid that has been generated: NW NW NE SW NW NW SW NW SW SE SE SW SE NE SW SE SW NE NE SW NW NE SW NW SW...

please make sure the same code is not shared with other UNSW python assignment order!.


QUIZ 9 COMP9021 PRINCIPLES OF PROGRAMMING $ python3 quiz_9.py Enter an integer: 0 Here is the grid that has been generated: NW NW NE SW NW NW SW NW SW SE SE SW SE NE SW SE SW NE NE SW NW NE SW NW SW SE NW NW SW NE NE NE NW NE NW SW SE SW NE SE SE SE SE NW NE NE SW NW NE There is no path to (0, 0) The preferred path to (6, 0) is: [(3, 3), (3, 4), (4, 3), (5, 4), (6, 3), (6, 2), (6, 1), (6, 0)] There is no path to (6, 6) The preferred path to (0, 6) is: [(3, 3), (2, 3), (1, 3), (0, 4), (0, 5), (0, 6)] $ python3 quiz_9.py Enter an integer: 1 Here is the grid that has been generated: SE NE SW NE NW NW NW NW SE NE NW NE NW NW NE NW SW SE NE SW NE NE NE NE NW SE NW NE SE NW NW SE SW SE SE NW SW NE NW NE SE SW NE SW NW SE SW SW NW The preferred path to (0, 0) is: [(3, 3), (2, 2), (1, 2), (0, 1), (0, 0)] There is no path to (6, 0) The preferred path to (6, 6) is: [(3, 3), (3, 2), (4, 3), (5, 4), (6, 5), (6, 6)] The preferred path to (0, 6) is: [(3, 3), (3, 2), (4, 3), (4, 4), (3, 5), (2, 4), (1, 4), (0, 4), (1, 5), (0, 6)] Date: Session 2, 2018. 2 COMP9021 PRINCIPLES OF PROGRAMMING $ python3 quiz_9.py Enter an integer: 2 Here is the grid that has been generated: NE NE NE SW SE SW SW SE NE SE NW NW SW NW SW NE NE SW NW SW NW NW SE SE SE SE NE SE SW SE SE SW SE NW NW SW SW SW NW SE NW NW SE NW SW NW SW NW NW There is no path to (0, 0) The preferred path to (6, 0) is: [(3, 3), (4, 3), (5, 3), (6, 2), (6, 1), (6, 0)] There is no path to (6, 6) The preferred path to (0, 6) is: [(3, 3), (3, 4), (2, 5), (1, 6), (0, 6)] $ python3 quiz_9.py Enter an integer: 3 Here is the grid that has been generated: SE SE SW NW NE NE NW SW SE SE NW NW NW SE SE SE NW NE NE SE NE SW NE SW NW NW NW NW NW SE SW NE NE SE NW SE SW NW SW NW NW SW NW SE SW NE SW SE SW There is no path to (0, 0) The preferred path to (6, 0) is: [(3, 3), (3, 2), (4, 1), (4, 0), (5, 0), (6, 0)] There is no path to (6, 6) The preferred path to (0, 6) is: [(3, 3), (2, 3), (1, 4), (1, 5), (0, 6)] QUIZ 9 3 $ python3 quiz_9.py Enter an integer: 4 Here is the grid that has been generated: SE SW NE NW NW SE NE NE NE NW SW NE SE SW SW SE NE SW SE NE SW SW SE SE SW SW SW NE SW NW SE SE SE NW SW NE SW NE SW SW SE NW NW SW NW NW SE SE SW There is no path to (0, 0) There is no path to (6, 0) The preferred path to (6, 6) is: [(3, 3), (3, 4), (4, 4), (5, 5), (6, 6)] The preferred path to (0, 6) is: [(3, 3), (2, 4), (3, 5), (2, 6), (1, 5), (0, 6)] $ python3 quiz_9.py Enter an integer: 5 Here is the grid that has been generated: SW SW NE NW SE NE SE NE SW NW SE NW NE SE NE SE NW SW SE NW SE NE SE NW SE SE NE NE SE SE SE SE SW SW SE SE SE SE NW SW NE SW NW SE SE SW NE SW SW The preferred path to (0, 0) is: [(3, 3), (4, 3), (5, 3), (5, 2), (4, 1), (3, 1), (3, 2), (2, 2), (1, 1), (0, 1), (0, 0)] The preferred path to (6, 0) is: [(3, 3), (4, 3), (5, 3), (5, 2), (5, 1), (6, 0)] The preferred path to (6, 6) is: [(3, 3), (4, 3), (5, 4), (5, 5), (6, 5), (6, 6)] There is no path to (0, 6)
Oct 04, 2020COMP9021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here