Let's take some time and make neat pictures with Tina and Tommy!
Remember, since they're both turtle
objects, we can move them forward
and backward
, turn them left
and right
, goto
a specific point, change their color
, and tell them to write
words on the screen. To tell Tina or Tommy what to do, add a command with a period after their name like this:
tina.forward(100)
tommy.goto(50,50)
goto
is particularly helpful in drawing.
Here's a trinket with Tina and Tommy in it, waiting for your commands. Add commands and run them to see what they do. Keep going until you have the picture you want! When you're done, use the Share links in the menu bar to share your link with your teacher or friends.
If you run into errors, check to make sure your parentheses (()
) and quotes ('
) are in the right places. If you want to start over, you can Reset the example in the left hand menu.
Thanks to Trinket.io for providing this assignment, part of their Hour of Python (opens new window) course.