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.