P1 Task 2 - Draw a Grid Of Rectangles ===================================== .. note:: When finished, submit the iRobot project code of your solution in Moodle Make the robot draw a grid of rectangles (see the figure 2a-c). The dimension of the grid (rows and columns) **must be changeable through variables** (figure 2a), i.e., the code is able to draw grids of arbitrary dimensions like 2x2, 2x7, 5x3, etc (figure 2b and 2c). The rectangles must not overlap with eachother. You are free to choose your drawing technique, which may be more efficient than one shown in figure 2. If you’re stuck then the “nested loop” and “variables” exercises might provide you some guidance. .. figure:: /figures/irobot_root/task_grid_printer_a.gif :scale: 40% :align: center **Figure. 2a:** The number of columns and rows in the grid must be controllable via variables .. figure:: /figures/irobot_root/task_grid_printer_b.gif :scale: 40% :align: center **Figure. 2b:** A 5x2 grid .. figure:: /figures/irobot_root/task_grid_printer_c.gif :scale: 40% :align: center **Figure. 2c:** A 3x5 grid