Python Coursework: A Patchwork Sampler Your task is to write a program to display patchwork samples, of the form given below:
A patchwork sample is made up of patches of two different designs. Patchworks are
square and can be of three different sizes: 5 × 5, 7 × 7 and 9 × 9. They are coloured by
cycling continuously through four colours (red, green, blue and magenta in the example
above) as we move from left-to-right along each row, and from the rightmost patch of each
row to the leftmost patch of the next.
Each patch features a regular geometric design made up of lines, circles, rectangles
and/or polygons and has dimensions of 100 × 100 pixels. The two patch designs and the
layout of patches are not necessarily as given in the sample above. They are determined
by the final three digits of your 6-digit student number, and are displayed in the tables
on the final two pages. The layout of the patch designs is given by the antepenultimate
(fourth) digit of your student number. The two patch designs are given by the penultimate
(fifth) and final (sixth) digits of your student number. The patch designs and arrangement
shown in the figure above would be used if your student number was, for example, 777032.
It’s important that your program draws the patch designs accurately, and that it draws the
correct designs with the correct arrangement – you will receive no credit for drawing the
wrong patch designs or the incorrect arrangement.
Your program should draw the patches using the facilities provided in the graphics module
(Line, Circle etc.), and must not use bitmapped images. The designs are intended to test
algorithm development skills (e.g. they should involve the use of one or more for loops).
For some of the designs, it will be useful to remember that shapes drawn later appear on
top of those drawn earlier