Description
COMP9021 PRINCIPLES OF PROGRAMMING
$ python3 quiz_7.py
Enter two integers: 0 1
Here is the grid that has been generated:
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
No chess knight has explored this board.
$ python3 quiz_7.py
Enter two integers: 0 -20
Here is the grid that has been generated:
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 1 0 0 1 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
At least 2 chess knights have explored this board.
$ python3 quiz_7.py
Enter two integers: 0 -6
Here is the grid that has been generated:
0 0 1 0 0 0 0 0 0 0
0 0 0 0 0 0 1 0 0 0
0 0 0 0 1 0 1 0 0 0
0 1 0 0 0 0 0 0 0 0
0 0 0 1 0 1 1 0 0 0
0 0 1 0 0 0 0 0 0 0
1 0 0 0 0 0 0 0 1 1
0 0 0 1 0 0 0 0 1 0
0 0 0 0 0 0 0 0 1 0
0 0 0 0 0 0 0 0 1 0
At least 7 chess knights have explored this board.
2 COMP9021 PRINCIPLES OF PROGRAMMING
$ python3 quiz_7.py
Enter two integers: 0 -5
Here is the grid that has been generated:
0 0 1 0 0 0 0 0 0 0
0 0 0 0 0 0 1 0 0 0
0 0 0 1 1 0 0 0 1 0
0 0 0 0 0 0 0 0 0 1
0 1 1 0 1 0 0 0 0 0
1 0 0 0 0 0 0 0 1 1
0 0 0 1 0 0 0 1 0 0
0 0 0 0 0 0 0 1 0 0
0 0 0 0 0 0 0 1 0 0
0 1 1 0 0 1 1 0 0 0
At least 8 chess knights have explored this board.
$ python3 quiz_7.py
Enter two integers: 0 -4
Here is the grid that has been generated:
0 0 1 0 0 0 0 0 0 0
0 0 0 1 0 0 0 1 1 0
0 1 0 0 0 0 0 0 0 1
1 1 0 1 0 0 0 0 1 0
0 0 0 0 1 1 0 0 1 0
0 1 0 0 0 0 1 0 0 0
0 0 0 0 1 0 0 1 1 0
0 1 1 0 0 0 0 0 0 0
0 0 1 0 1 0 0 0 0 1
0 1 0 0 0 0 0 1 1 0
At least 6 chess knights have explored this board.
$ python3 quiz_7.py
Enter two integers: 0 3
Here is the grid that has been generated:
1 1 0 1 1 1 1 1 1 1
1 0 1 0 1 0 0 1 1 1
1 1 0 1 0 1 0 1 1 1
1 0 1 1 1 1 1 0 1 1
1 1 1 0 1 0 0 1 1 1
1 1 0 1 1 1 0 1 1 1
0 0 1 0 0 0 1 1 0 0
1 1 1 0 1 1 1 1 0 1
1 1 0 1 1 1 1 1 0 1
1 1 1 0 1 0 0 0 0 1
At least 3 chess knights have explored this board.
Reviews
There are no reviews yet.