ex10KangYooPark

ex10KangYooPark - # ex10KangYooPark.py # 11/05/08 #...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
# ex10KangYooPark.py # 11/05/08 # importing neccessary files to call functions needed import math import sys sys.path.append("/Users/Genius/Documents/CS5NM/swampy.1.1") from TurtleWorld import * world = TurtleWorld() babyt = Turtle() print babyt # putting the turtle in the starting position pu(babyt) lt(babyt) fd(babyt, 150) lt(babyt) fd(babyt, 160) lt(babyt) pd(babyt) # drawing a pencil with the given height def drawpencil(t, height, width): # drawing the eraser part fd(t, (0.2 * height)) lt(t) fd(t, width) lt(t) fd(t, (0.2 * height)) lt(t) fd(t, width) lt(t) fd(t, (0.2 * height)) # drawing small metal part of the pencil b/t the eraser and the wood for i in range(3): fd(t, ((1.0/30)*height)) lt(t) fd(t, width) lt(t) fd(t, ((1.0/30)*height)) lt(t) fd(t, width) lt(t) fd(t, ((1.0/30)*height)) # declaring variables so it's easier for me to work
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 2

ex10KangYooPark - # ex10KangYooPark.py # 11/05/08 #...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online