8.2 Drawing a rectangle with chosen dimension

We define here a procedure called rec depending on two variables representing the dimensions of the rectangle. Hence rec 200 100 will draw a rectangle with height 200 and width 100.

 to rec :lo :la
 repeat 2 [forward :lo right 90 forward :la right 90]
 end

Make some examples:

 rec 200 100 rec 100 300 rec 50 150 rec 1 20 rec 100 2

If we give to the procedure rec only one number, the interpreter will send an error message indicating that the procedure is waiting for a second argument.