Practice Problems ***************** Here are some practice problems to polish what you've learnt so far. Try to solve as many of them as possible. Write a program that draws the following sketches. **Problem 5.1** .. figure:: images/p01.svg :width: 200 :alt: Problem 1 **Problem 5.2** .. figure:: images/p02.svg :width: 200 :alt: Problem 2 **Problem 5.3** .. figure:: images/p03.svg :width: 200 :alt: Problem 3 **Problem 5.4** .. figure:: images/p04.svg :width: 200 :alt: Problem 4 **Problem 5.5** .. figure:: images/p05.svg :width: 200 :alt: Problem 5 **Problem 5.6** .. figure:: images/p06.svg :width: 200 :alt: Problem 6 **Problem 5.7** .. figure:: images/p07.svg :width: 200 :alt: Problem 7 **Problem 5.8** .. figure:: images/p08.svg :width: 200 :alt: Problem 4 **Problem 5.9** .. figure:: images/p09.svg :width: 200 :alt: Problem 9 **Problem 5.10** .. figure:: images/p10.svg :width: 200 :alt: Problem 10 **Problem 5.11** .. figure:: images/p11.svg :width: 200 :alt: Problem 11 **Problem 5.12** .. figure:: images/p12.svg :width: 200 :alt: Problem 12 **Problem 5.13** .. figure:: images/p13.svg :width: 200 :alt: Problem 13 **Problem 5.14** Write a program to draw one of the diagonals in random for each cell in a grid. For example, if you take a 2x2 grid, you would get something like the figure below. .. figure:: images/p14-2.svg :width: 200 :alt: Problem 14 2x2 If you take a 16x16 grid, you'll should get a beatiful maze like this one. .. figure:: images/p14.svg :width: 200 :alt: Problem 14 It is not as complex as it sounds. Give it a try. Please note that the grid in the background was drawn for illustration and you don't need to draw that. **Problem 5.15** .. figure:: images/p15.svg :width: 200 :alt: Problem 15 **Problem 5.16** .. figure:: images/p16.svg :width: 200 :alt: Problem 16 **Problem 5.17** .. figure:: images/p17.svg :width: 200 :alt: Problem 17 **Problem 5.18** .. figure:: images/p18.svg :width: 200 :alt: Problem 18 **Problem 5.19** Every third shape is a square. .. figure:: images/p19.svg :width: 200 :alt: Problem 19 **Problem 5.20** Alternating cirle, square and diamonds. .. figure:: images/p20.svg :width: 200 :alt: Problem 20