Exercise 8: Drawing a Square with second tasks

Drawing a Square with second tasks

Perfect, we can do what we wanted: build the square!

Define a procedure DrawBlackSquareSide3 which, using DrawBlackLine3, draws a black square on the board.

GBB/1.0 size 3 3 cell 0 0 Negro 1 cell 0 1 Negro 1 cell 0 2 Negro 1 cell 1 0 Negro 1 cell 1 1 Negro 1 cell 1 2 Negro 1 cell 2 0 Negro 1 cell 2 1 Negro 1 cell 2 2 Negro 1 head 0 2

Give me a hint!

Remember what we said some exercises before: we can imagine a 3x3 square like 3 lines of length 3 one on top of the other, can't we? Oh! Also, remember that DrawBlackLine3 already uses ComeBack when it finishes.

You must sign in before submitting your solutions

Oops, your solution didn't work

  • Check that your program does not have recursion or an infinite loop
  • Check that you have an internet connection
  • Wait a while and try again

We are processing you solution

Please press F5 if results are not displayed after a few seconds