0% found this document useful (0 votes)
312 views9 pages

Tracy's Grid World (Intro Python) (Intro To Programming With Tracy The Turtle)

[Computing+Ideas]+[Internet]+[01]+Welcome+to+the+Internet+-+WEEK+5-6

Uploaded by

almotaz.muntaser
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
312 views9 pages

Tracy's Grid World (Intro Python) (Intro To Programming With Tracy The Turtle)

[Computing+Ideas]+[Internet]+[01]+Welcome+to+the+Internet+-+WEEK+5-6

Uploaded by

almotaz.muntaser
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Tracy’s Grid World

Where Does Tracy Live?


Tracy lives in a grid world.

Tracy’s home!
Tracy always
starts at (0, 0).
Tracy’s Grid World
(-200, 200) (200, 200)

400 pixels

(-200, -200) (200, -200)


Tracy’s Grid World
(-200, 200) (200, 200)

400 pixels
(-200, -200) (200, -200)
Tracy Command: backward

forward(distance) backward(distance)
Moves Tracy forward Moves Tracy backward
a specified distance a specified distance
forward(100) backward(100)
Tracy Command: penup and pendown
penup() pendown()
Stops Tracy from Has Tracy start
leaving a trail drawing a trail
penup() pendown()
forward(100) forward(100)

Note: Tracy always starts with her pen down!


Example #1: 2 Dashes

Write a program that


has Tracy draw 2
dashes across the
x-axis of the canvas.
CODE EDITOR- Example #1

2 Dashes
Commands Learned this Lesson

Command What does it do?


backward(distance) Moves Tracy backward a specified
distance
penup() Stops Tracy from leaving a trail
pendown() Has Tracy start drawing a trail

You might also like