Nov 282016
LQ How do I debug LOGO code?
- Work your way through these files
- Open
- Debug
- Save
Success Steps
- Read code as a set of instructions – step by step
- Spot spelling mistakes
- Edit and play to test changes
LQ How can I decorate a LOGO Christmas tree?
- Open this file
- Think about what you could add to decorate the tree (bauble, star, bell, present, angel, tinsel….)
- For each item, make a procedure, eg
- to bauble
- instructions for bauble
- end
- Then use pu setxy pd to position your items on the tree:
- pu setxy 100 100 pd bauble
- ** For a line of items, you could use repeat, eg
- repeat 4
- [
- bauble
- pu fd 30 rt 90 fd 40 lt 90 pd
- ]
- *** Include a variable with your procedure to make it different colours or sizes
- to bauble :col :size
- colour :col
- circle :size
- fill
- end
- to bauble :col :size
- When you “call” bauble, make sure you give it a colour and size, eg
- bauble “red 30