I am working on the turtle draw lesson. I can make boxes and stars. How can I make it start in a new location?
1 response
-
Howdy leynab, hope you are enjoying ruby and the Turtle.
I don't think the lesson mentions it, but you can also use a couple of commands called
penupandpendownto allow moving without drawing.For example, this will take the pen off the 'paper', move 150, then put the pen back down and continue.
Turtle.start do penup forward 150 pendown pencolor maroon 4.times do forward 50 turnright 90 end endNote: if you
penupthen you must usependownagain to continue drawing (to see what happens, remove thependownand run it)Cheers