# make the turtle graphics module available import turtle # set up our graphical canvas # width = 500, height = 500 # starting point will be the center of the screen turtle.setup(500,500) # pick up the pen so we can move to a new position turtle.penup() # now move to the top left side of the screen turtle.goto(-200, 200) # put the pen down turtle.pendown() # draw a square here turtle.forward(100) turtle.right(90) turtle.forward(100) turtle.right(90) turtle.forward(100) turtle.right(90) turtle.forward(100) turtle.right(90) # pick up the pen and move to the bottom right side # of the screen turtle.penup() turtle.goto(100, -100) # put the pen down when we get here turtle.pendown() # make sure we are facing to the right turtle.setheading(0) # now draw a triangle turtle.forward(100) turtle.right(120) turtle.forward(100) turtle.right(120) turtle.forward(100) turtle.right(120) # pentagon at top right side of the screen # pick up pen and move turtle.penup() turtle.goto(100, 200) turtle.pendown() # make sure we are facing to the right turtle.setheading(0) # draw the pentagon turtle.forward(100) turtle.right(360/5) turtle.forward(100) turtle.right(360/5) turtle.forward(100) turtle.right(360/5) turtle.forward(100) turtle.right(360/5) turtle.forward(100) turtle.right(360/5) # octogon at bottom left side of the screen # pick up pen and move turtle.penup() turtle.goto(-200, -100) turtle.pendown() # make sure we are facing to the right turtle.setheading(0) # draw the octogon turtle.forward(50) turtle.right(360/8) turtle.forward(50) turtle.right(360/8) turtle.forward(50) turtle.right(360/8) turtle.forward(50) turtle.right(360/8) turtle.forward(50) turtle.right(360/8) turtle.forward(50) turtle.right(360/8) turtle.forward(50) turtle.right(360/8) turtle.forward(50) turtle.right(360/8)