|
@@ -143,13 +143,13 @@ In the example, the code is trying to move the robot as many times as it can tow
|
143
|
143
|
|
144
|
144
|
|
145
|
145
|
|
146
|
|
-## Laboratory Session
|
|
146
|
+## Laboratory Session:
|
147
|
147
|
|
148
|
148
|
### Exercise 1 - Square Grid
|
149
|
149
|
|
150
|
150
|
Suppose that the robot is currently in the upper left room (northwest) of a **square** space of rooms, i.e. the space contains the same number of rows and columns of rooms (like the one in Figure 1). Design an algorithm that allows the robot to compute the number of rooms that there are in the grid.
|
151
|
151
|
|
152
|
|
-**Instructions**
|
|
152
|
+#### Instructions
|
153
|
153
|
|
154
|
154
|
1. Load the project `CountingSquares` into `QtCreator`. There are two ways to do this:
|
155
|
155
|
|
|
@@ -169,7 +169,7 @@ Suppose that the robot is currently in the upper left room (northwest) of a **sq
|
169
|
169
|
|
170
|
170
|
### Exercise 2 - Rectangular Grid
|
171
|
171
|
|
172
|
|
-**Instructions**
|
|
172
|
+#### Instructions
|
173
|
173
|
|
174
|
174
|
1. Suppose that now the robot is in the upper left room (northwest) of a **rectangular** space (not necessarily square) of rooms. Design an algorithm so the robot can compute the number of rooms in the grid.
|
175
|
175
|
|
|
@@ -181,7 +181,7 @@ Suppose that the robot is currently in the upper left room (northwest) of a **sq
|
181
|
181
|
|
182
|
182
|
### Exercise 3 - Rectangular Grid, Random Position
|
183
|
183
|
|
184
|
|
-**Instructions**
|
|
184
|
+#### Instructions
|
185
|
185
|
|
186
|
186
|
1. Suppose that now the robot starts its task in any of the rooms in a **rectangular** grid (not necessarily square). Design an algorithm so the robot can compute the number of rooms there are in the grid.
|
187
|
187
|
|
|
@@ -195,7 +195,7 @@ Suppose that the robot is currently in the upper left room (northwest) of a **sq
|
195
|
195
|
|
196
|
196
|
### Exercise 4 - Pyramid Grid, Random Position
|
197
|
197
|
|
198
|
|
-**Instructions**
|
|
198
|
+#### Instructions
|
199
|
199
|
|
200
|
200
|
1. Suppose that now the robot starts its task in any of the rooms in a grid shaped like a pyramid. Design an algorithm so the robot can compute the number of rooms there are in the grid.
|
201
|
201
|
|