Using a Turtle
Imagine a Turtle …
 Crawling over a huge
sheet of paper
 With a pen tied to its
tail.




You can comma...
The basics

Tells Python to use the
Turtle module

Sets up a Turtle and makes
it a Turtle Shape

Moves forward 100 pixels
...
Challenges


Draw a square:
 By repeating the same commands four times


 Using ‘For I in range(4):’ 



Draw a hex...
Turtle graphics
Upcoming SlideShare
Loading in …5
×

Turtle graphics

1,146 views

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,146
On SlideShare
0
From Embeds
0
Number of Embeds
668
Actions
Shares
0
Downloads
3
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Turtle graphics

  1. 1. Using a Turtle Imagine a Turtle …  Crawling over a huge sheet of paper  With a pen tied to its tail.   You can command it.
  2. 2. The basics Tells Python to use the Turtle module Sets up a Turtle and makes it a Turtle Shape Moves forward 100 pixels Turns right by 90 degrees Closes the graphic window when you quit
  3. 3. Challenges  Draw a square:  By repeating the same commands four times   Using ‘For I in range(4):’    Draw a hexagon Allow the user to say how many sides the polygon should have  Remember, use ‘myVariable = int(raw_input)’ to get a number from the user  Get the turtle to draw your initials

×