首页 > > 详细

COMP9021 PRINCIPLES OF PROGRAMMING QUIZ 6

QUIZ 6
COMP9021 PRINCIPLES OF PROGRAMMING
$ python3 quiz_6.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_6.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_6.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.
Date: Session 2, 2018.
2 COMP9021 PRINCIPLES OF PROGRAMMING
$ python3 quiz_6.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_6.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_6.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.

联系我们
  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-21:00
  • 微信:codinghelp
热点标签

联系我们 - QQ: 99515681 微信:codinghelp
程序辅导网!