Copyright © University of Cambridge. All rights reserved.

'LOGO Challenge 4 - Squares to Procedures' printed from https://nrich.maths.org/

Show menu

You can create several procedures for different objects and combine them:
Here is a procedure for a square (called "sq"):
To sq
REPEAT 4 [FD 40 RT 90]
end

And, here is a procedure for an equilateral triangle:
To tri
REPEAT 3 [FD 40 RT 120]
end

Here is a procedure for a "house"!
To house
sq FD 40 RT 30 tri
end

See if you can produce some patterns based on "sq" and "tri" using procedures.
The biggest challenge is to be able to tell the turtle how to get to the right place pointing in the right direction to join shapes together in the way you intended.
Can you write a procedure to produce a row of houses?