Quiz Answer Key and Fun Facts
1. The turtle is the main tool to create Logo's signature graphical patterns. It behaves just like a robot. What kind of commands do you need to control it?
2. Assume your turtle is pointing upwards, in the middle of a blank screen and has its pen down, ready to draw. What would be the visible result of the following sequence? (Note - the syntax is definitely correct as is).
forward 15 left 135 forward 5
3. I want to create a small square on the screen. Obviously, I could write out
forward 8 right 90 forward 8 right 90 forward 8 right 90 forward 8
but what would be a better way, using a simple loop? Try a syntax that resembles what you already know.
4. Some tasks are a bit more difficult if you are a little turtle. Drawing a circle is one of the things that might require a bit of thought. How could you tell a single-minded Logo turtle to draw a circle (or rather a good approximation of one)?
5. Don't worry, you won't have to compose text out of turtle graphics. You can also simply ask the computer to write text. Remembering that this language was developed in the 1960s, before screen terminals were common, what statement do we need to output a text?
6. Any good programming language will allow you to create user-defined functions or modules. Logo is no different. How would you - very simply - begin a block of code that wants to define a procedure named "ask"?
7. If you want to do more complex things, you can use variables. To distinguish them from keywords, we need to introduce them with a punctuation mark. Remembering that we define variables to be something, what is the appropriate punctuation used by Logo to indicate a variable?
8. While we are on the topic of variables in Logo, what can you put into them? Think like a child and experiment!
9. Logo has its roots in the LISP programming language and in fact has similar list-processing capabilities. LISP knows the functions car, returning the first element of a list and cdr, returning the list minus its first element.
These cryptic keywords are hardly easy to memorize, so what does Logo use instead?
10. I hope you've paid attention and have a bit of visual imagination. Here's your final exam. Take the following piece of Logo code:
to something :lines
repeat :lines [forward 100 left 180-180/:lines]
end
"Something" is a bad name for this procedure because once you call it with an odd number greater than 3, it does draw something beautiful. What do I get? If you don't immediately see the only viable possibility, try it in your mind for 5. 180-180/5 is 144.
Source: Author
WesleyCrusher
This quiz was reviewed by FunTrivia editor
rossian before going online.
Any errors found in FunTrivia content are routinely corrected through our feedback system.