辅导案例-QUIZ 6

欢迎使用51辅导,51作业君孵化低价透明的学长辅导平台,服务保持优质,平均费用压低50%以上! 51fudao.top
QUIZ 6
COMP9021 PRINCIPLES OF PROGRAMMING
$ python3 quiz_6.py
Enter two integers, the second one being strictly positive: 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
There is no parallelogram with horizontal sides.
$ 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 largest parallelogram with horizontal sides has a size of 4.
$ python3 quiz_6.py
Enter two integers, the second one being strictly positive: 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
The largest parallelogram with horizontal sides has a size of 12.
Date: Term 3, 2019.
2 COMP9021 PRINCIPLES OF PROGRAMMING
$ 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 largest parallelogram with horizontal sides has a size of 12.
$ python3 quiz_6.py
Enter two integers, the second one being strictly positive: 1 4
Here is the grid that has been generated:
1 0 1 0 1 1 1 1 1 0
1 0 1 1 0 1 1 1 0 1
0 0 0 0 1 1 1 0 1 1
1 1 1 1 1 1 1 0 1 0
1 1 0 1 1 1 1 1 1 1
0 1 1 1 1 1 1 1 0 1
0 1 1 1 1 0 1 0 1 1
1 1 1 0 1 1 1 1 1 1
1 0 1 1 1 1 0 1 1 1
1 1 1 1 1 0 1 1 0 1
The largest parallelogram with horizontal sides has a size of 16.
$ python3 quiz_6.py
Enter two integers, the second one being strictly positive: 0 5
Here is the grid that has been generated:
1 1 0 1 1 1 1 1 1 1
1 1 1 1 1 1 0 1 1 1
1 1 1 0 0 1 1 1 0 1
1 1 1 1 1 1 1 1 1 0
1 0 0 1 0 1 1 1 1 1
0 1 1 1 1 1 1 1 0 0
1 1 1 0 1 1 1 0 1 1
1 1 1 1 1 1 1 0 1 1
1 1 1 1 1 1 1 0 1 1
1 0 0 1 1 0 0 1 1 1
The largest parallelogram with horizontal sides has a size of 15.
51作业君

Email:51zuoyejun

@gmail.com

添加客服微信: abby12468