首页 > > 详细

COMP9021 Quiz 6

 Coding Quiz 6

COMP9021 PRINCIPLES OF PROGRAMMING
Term 3, 2021
$ python3 quiz_6.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_6.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_6.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 1
$ python3 quiz_6.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_6.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_6.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 2
联系我们
  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-21:00
  • 微信:codinghelp
热点标签

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