Description
COMP9021 PRINCIPLES OF PROGRAMMING
$ python3 quiz_4.py
Enter four positive integers: 0 1 0 0
Here is how the x-coordinates of your points start: 0
Here is how the y-coordinates of your points start: 0
Here are the points, without duplicates, from highest to lowest,
and from left to right for a given height:
(0, 0)
All points fit in a rectangle of size 0, with (0, 0) as top left corner, and with (0, 0) as bottom right corner.
The maximum number of points that fit in a square window of size 0
enclosed within the rectangle is 1.
The leftmost, topmost such window has (0, 0) as top left corner, and (0, 0) as bottom right corner.
$ python3 quiz_4.py
Enter four positive integers: 0 1 0 1
Here are the x-coordinates of your points: 0
Here are the y-coordinates of your points:
0
Here are the points, without duplicates, from highest to lowest, and from left to right for a given height:
(0, 0)
All points fit in a rectangle of size 0, with (0, 0) as top left corner, and with (0, 0) as bottom right corner.
The maximum number of points that fit in a square window of size 1 enclosed within the rectangle is 0.
0 2 5 0
1 1
Here is how the y-coordinates of your points start:
-5 -1
Here are the points, without duplicates, from highest to lowest, and from left to right for a given height:
(1, -1)
(1, -5)
All points fit in a rectangle of size 0, with (1, -1) as top left corner, and with (1, -5) as bottom right corner.
The maximum number of points that fit in a square window of size 0 enclosed within the rectangle is 1.
The leftmost, topmost such window has (1, -1) as top left corner, and (1, -1) as bottom right corner.
$ python3 quiz_4.py
Enter four positive integers: 0 2 5 2
Here is how the x-coordinates of your points start:
1 1
Here is how the y-coordinates of your points start:
-5 -1
Here are the points, without duplicates, from highest to lowest, and from left to right for a given height:
(1, -1)
(1, -5)
All points fit in a rectangle of size 0, with (1, -1) as top left corner, and with (1, -5) as bottom right corner.
The maximum number of points that fit in a square window of size 2
enclosed within the rectangle is 0.
0 8 2 1
1 1 -2 0 2 1 1 0
Here is how the y-coordinates of your points start:
1 0 2 -1 2 -1 0 -1
Here are the points, without duplicates, from highest to lowest, and from left to right for a given height:
(-2, 2)
(2, 2)
(1, 1)
(1, 0)
(0, -1)
(1, -1)
All points fit in a rectangle of size 12, with (-2, 2) as top left corner, and with (2, -1) as bottom right corner.
The maximum number of points that fit in a square window of size 1 enclosed within the rectangle is 3.
The leftmost, topmost such window has (0, 0) as top left corner, and (1, -1) as bottom right corner.
$ python3 quiz_4.py
Enter four positive integers: 0 8 2 3
Here is how the x-coordinates of your points start:
1 1 -2 0 2 1 1 0
Here is how the y-coordinates of your points start:
1 0 2 -1 2 -1 0 -1
Here are the points, without duplicates, from highest to lowest, and from left to right for a given height:
(-2, 2)
(2, 2)
(1, 1)
(1, 0)
(0, -1)
(1, -1)
All points fit in a rectangle of size 12, with (-2, 2) as top left corner, and with (2, -1) as bottom right corner.
The maximum number of points that fit in a square window of size 3 enclosed within the rectangle is 5.
The leftmost, topmost such window has (-2, 2) as top left corner, and (1, -1) as bottom right corner.
0 100 2 1
1 1 -2 0 2 1 1 0 1 0 2 -1 2 -1 0 -1 -2 2 0 2 2 -1 0 -2 -2 0
Here is how the y-coordinates of your points start:
0 2 -1 -1 2 1 2 0 1 1 0 -2 0 2 -2 1 2 0 -1 -1 -2 0 -2 -1 0 -1
Here are the points, without duplicates, from highest to lowest, and from left to right for a given height:
(-2, 2)
(-1, 2)
(0, 2)
(1, 2)
(2, 2)
(-2, 1)
(-1, 1)
(0, 1)
(1, 1)
(2, 1)
(-2, 0)
(-1, 0)
(0, 0)
(1, 0)
(2, 0)
(-2, -1)
(-1, -1)
(0, -1)
(1, -1)
(2, -1)
(-2, -2)
(-1, -2)
(0, -2)
(1, -2)
(2, -2)
All points fit in a rectangle of size 16, with (-2, 2) as top left corner, and with (2, -2) as bottom right corner.
The maximum number of points that fit in a square window of size 1 enclosed within the rectangle is 4.
The leftmost, topmost such window has (-2, 2) as top left corner, and (-1, 1) as bottom right corner.
0 100 2 4
1 1 -2 0 2 1 1 0 1 0 2 -1 2 -1 0 -1 -2 2 0 2 2 -1 0 -2 -2 0
Here is how the y-coordinates of your points start:
0 2 -1 -1 2 1 2 0 1 1 0 -2 0 2 -2 1 2 0 -1 -1 -2 0 -2 -1 0 -1
Here are the points, without duplicates, from highest to lowest, and from left to right for a given height:
(-2, 2)
(-1, 2)
(0, 2)
(1, 2)
(2, 2)
(-2, 1)
(-1, 1)
(0, 1)
(1, 1)
(2, 1)
(-2, 0)
(-1, 0)
(0, 0)
(1, 0)
(2, 0)
(-2, -1)
(-1, -1)
(0, -1)
(1, -1)
(2, -1)
(-2, -2)
(-1, -2)
(0, -2)
(1, -2)
(2, -2)
All points fit in a rectangle of size 16, with (-2, 2) as top left corner, and with (2, -2) as bottom right corner.
The maximum number of points that fit in a square window of size 4 enclosed within the rectangle is 25.
The leftmost, topmost such window has (-2, 2) as top left corner, and (2, -2) as bottom right corner.
12 11 5 4
2 -1 5 3 5 0 -3 1 -5 0 2
Here is how the y-coordinates of your points start:
-1 5 2 4 -2 3 -5 5 4 -3 2
Here are the points, without duplicates, from highest to lowest, and from left to right for a given height:
(-1, 5)
(1, 5)
(-5, 4)
(3, 4)
(0, 3)
(2, 2)
(5, 2)
(2, -1)
(5, -2)
(0, -3)
(-3, -5)
All points fit in a rectangle of size 100, with (-5, 5) as top left corner, and with (5, -5) as bottom right corner.
The maximum number of points that fit in a square window of size 4 enclosed within the rectangle is 5.
The leftmost, topmost such window has (-1, 5) as top left corner, and (3, 1) as bottom right corner.
23 14 4 5
0 -3 -4 0 2 2 4 1 -2 -1 0 3 -4 -1
Here is how the y-coordinates of your points start:
3 -4 -3 -3 3 2 -4 4 2 1 -4 -1 -4 1
Here are the points, without duplicates, from highest to lowest, and from left to right for a given height:
(1, 4)
(0, 3)
(2, 3)
(-2, 2)
(2, 2)
(-1, 1)
(3, -1)
(-4, -3)
(0, -3)
(-4, -4)
(-3, -4)
(0, -4)
(4, -4)
All points fit in a rectangle of size 64, with (-4, 4) as top left corner, and with (4, -4) as bottom right corner.
The maximum number of points that fit in a square window of size 5 enclosed within the rectangle is 7.
The leftmost, topmost such window has (-2, 4) as top left corner, and (3, -1) as bottom right corner.
100 11 5 3
-3 2 2 -3 1 0 1 3 -4 3 -4
Here is how the y-coordinates of your points start:
-4 2 -1 -5 5 5 -2 0 -2 -1 -2
Here are the points, without duplicates, from highest to lowest, and from left to right for a given height:
(0, 5)
(1, 5)
(2, 2)
(3, 0)
(2, -1)
(3, -1)
(-4, -2)
(1, -2)
(-3, -4)
(-3, -5)
All points fit in a rectangle of size 70, with (-4, 5) as top left corner, and with (3, -5) as bottom right corner.
The maximum number of points that fit in a square window of size 3 enclosed within the rectangle is 4.
The leftmost, topmost such window has (0, 2) as top left corner, and (3, -1) as bottom right corner.
Reviews
There are no reviews yet.