程序代写代做代考 python QUIZ 3

QUIZ 3

COMP9021 PRINCIPLES OF PROGRAMMING

$ python3 quiz_3.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

The largest block construction has no block.
$ python3 quiz_3.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 block construction has 6 blocks.
$ python3 quiz_3.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 block construction has 14 blocks.

Date: Session 2, 2018.

2 COMP9021 PRINCIPLES OF PROGRAMMING

$ python3 quiz_3.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 block construction has 17 blocks.
$ python3 quiz_3.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 block construction has 33 blocks.
$ python3 quiz_3.py
Enter two integers, the second one being strictly positive: 0 6
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 1 0 1 0 1 1 1
1 0 1 1 1 1 1 1 1 1
1 1 1 0 1 0 0 1 1 1
1 1 0 1 1 1 1 1 1 1
0 1 1 1 1 1 1 1 0 0
1 1 1 0 1 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

The largest block construction has 42 blocks.