Nov 282016
 

LQ How do I debug LOGO code?

  1. Work your way through these files
  2. Open
  3. Debug
  4. 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?

  1. Open this file
  2. Think about what you could add to decorate the tree (bauble, star, bell, present, angel, tinsel….)
  3. For each item, make a procedure, eg
    1. to bauble
    2. instructions for bauble
    3. end
  4. Then use pu setxy pd to position your items on the tree:
    1. pu setxy 100 100 pd bauble
  5. ** For a line of items, you could use repeat, eg
    • repeat 4
    • [
    • bauble
    • pu fd 30 rt 90 fd 40 lt 90 pd
    • ]
  6. *** Include a variable with your procedure  to make it different colours or sizes
    • to bauble :col :size
      • colour :col
      • circle :size
      • fill
    • end
  7. When you “call” bauble, make sure you give it a colour and size, eg
    1. bauble “red  30

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

This site uses Akismet to reduce spam. Learn how your comment data is processed.