辅导案例-QUIZ 7

欢迎使用51辅导,51作业君孵化低价透明的学长辅导平台,服务保持优质,平均费用压低50%以上! 51fudao.top
QUIZ 7
COMP9021 PRINCIPLES OF PROGRAMMING
$ python3 quiz_7.py
Enter two integers, the second one being strictly positive: 0 8
Here is the grid that has been generated:
1 1 0 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 0
0 1 1 0 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1
1 1 1 1 0 1 1 1 1 1
1 0 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 0
1 1 1 1 1 1 1 0 1 1
The maximum number of spikes of some shape is: 1
$ python3 quiz_7.py
Enter two integers, the second one being strictly positive: 0 7
Here is the grid that has been generated:
1 1 1 1 0 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1
1 0 1 1 1 1 1 1 1 1
1 0 1 0 1 1 1 1 1 0
1 1 1 1 1 1 1 1 1 1
1 1 0 1 1 0 0 1 1 1
1 1 1 1 1 0 1 1 1 1
1 1 1 1 1 1 0 1 1 1
1 1 1 1 1 1 0 0 1 1
1 0 1 1 1 1 0 1 1 1
The maximum number of spikes of some shape is: 3
$ python3 quiz_7.py
Enter two integers, the second one being strictly positive: 0 2
Here is the grid that has been generated:
1 1 0 1 1 1 1 1 1 0
0 1 0 0 1 0 1 0 0 1
1 0 1 1 1 0 1 1 1 0
0 0 1 0 1 1 0 1 0 0
0 0 0 1 0 0 1 1 0 1
1 0 1 0 1 1 0 1 1 0
1 0 0 0 0 1 1 0 0 0
0 0 0 1 1 0 0 1 1 1
1 1 0 1 0 1 1 0 0 0
1 0 0 1 0 1 1 0 0 0
The maximum number of spikes of some shape is: 7
Date: Term 3, 2019.
2 COMP9021 PRINCIPLES OF PROGRAMMING
$ python3 quiz_7.py
Enter two integers, the second one being strictly positive: 0 4
Here is the grid that has been generated:
1 1 0 1 1 1 1 1 1 1
1 1 1 0 1 1 1 0 0 1
1 0 1 1 1 1 1 1 1 0
0 0 1 0 1 1 1 1 0 1
1 1 1 1 0 0 1 1 0 1
1 0 1 1 1 1 0 1 1 1
1 1 1 1 0 1 1 0 0 1
1 0 0 1 1 1 1 1 1 1
1 1 0 1 0 1 1 1 1 0
1 0 1 1 1 1 1 0 0 1
The maximum number of spikes of some shape is: 8
$ python3 quiz_7.py
Enter two integers, the second one being strictly positive: 1 2
Here is the grid that has been generated:
0 0 1 0 1 1 1 1 0 0
1 0 1 1 0 1 1 0 0 1
0 0 0 0 1 0 1 0 0 1
1 0 1 0 0 1 1 0 1 0
0 1 0 1 1 0 1 1 1 1
0 1 0 1 1 0 1 1 0 1
0 0 1 1 1 0 1 0 1 1
0 0 0 0 0 0 1 1 1 1
1 0 1 0 0 1 0 1 1 0
1 1 1 1 1 0 1 1 0 0
The maximum number of spikes of some shape is: 5
$ python3 quiz_7.py
Enter two integers, the second one being strictly positive: 2 2
Here is the grid that has been generated:
0 0 0 1 0 1 1 0 0 0
1 1 1 1 1 0 0 1 1 1
1 1 0 0 0 0 0 0 1 0
0 1 0 1 1 1 1 1 1 0
1 1 0 1 1 1 1 1 1 1
1 1 0 1 0 1 1 1 1 1
1 0 1 1 0 1 0 0 0 0
0 1 0 0 0 1 0 0 0 1
0 0 1 1 0 0 0 0 0 0
0 0 0 1 1 0 0 0 0 1
The maximum number of spikes of some shape is: 4
51作业君

Email:51zuoyejun

@gmail.com

添加客服微信: abby12468