turtle.lt()

turtle.lt(angle) Parameters: angle – a number (integer or float) Turn turtle left by angle units. (Units are by default degrees, but can be set via the degrees() and radians() functions.) Angle orientation depends on the turtle mode, see mode(). >>> turtle.heading() 22.0 >>> turtle.left(45) >>> turtle.heading() 67.0

turtle.ht()

turtle.ht() Make the turtle invisible. It’s a good idea to do this while you’re in the middle of doing some complex drawing, because hiding the turtle speeds up the drawing observably. >>> turtle.hideturtle()

turtle.home()

turtle.home() Move turtle to the origin – coordinates (0,0) – and set its heading to its start-orientation (which depends on the mode, see mode()). >>> turtle.heading() 90.0 >>> turtle.position() (0.00,-10.00) >>> turtle.home() >>> turtle.position() (0.00,0.00) >>> turtle.heading() 0.0

turtle.hideturtle()

turtle.hideturtle() turtle.ht() Make the turtle invisible. It’s a good idea to do this while you’re in the middle of doing some complex drawing, because hiding the turtle speeds up the drawing observably. >>> turtle.hideturtle()

turtle.isdown()

turtle.isdown() Return True if pen is down, False if it’s up. >>> turtle.penup() >>> turtle.isdown() False >>> turtle.pendown() >>> turtle.isdown() True

turtle.goto()

turtle.goto(x, y=None) turtle.setpos(x, y=None) turtle.setposition(x, y=None) Parameters: x – a number or a pair/vector of numbers y – a number or None If y is None, x must be a pair of coordinates or a Vec2D (e.g. as returned by pos()). Move turtle to an absolute position. If the pen is down, draw line. Do not change the turtle’s orientation. >>> tp = turtle.pos() >>> tp (0.00,0.00) >>> turtle.setpos(60,30) >>> turtle.pos() (60.00,30.00) >>>

turtle.get_shapepoly()

turtle.get_shapepoly() Return the current shape polygon as tuple of coordinate pairs. This can be used to define a new shape or components of a compound shape. >>> turtle.shape("square") >>> turtle.shapetransform(4, -1, 0, 2) >>> turtle.get_shapepoly() ((50, -20), (30, 20), (-50, 20), (-30, -20))

turtle.get_poly()

turtle.get_poly() Return the last recorded polygon. >>> turtle.home() >>> turtle.begin_poly() >>> turtle.fd(100) >>> turtle.left(20) >>> turtle.fd(30) >>> turtle.left(60) >>> turtle.fd(50) >>> turtle.end_poly() >>> p = turtle.get_poly() >>> register_shape("myFavouriteShape", p)

turtle.heading()

turtle.heading() Return the turtle’s current heading (value depends on the turtle mode, see mode()). >>> turtle.home() >>> turtle.left(67) >>> turtle.heading() 67.0

turtle.getturtle()

turtle.getturtle() turtle.getpen() Return the Turtle object itself. Only reasonable use: as a function to return the “anonymous turtle”: >>> pet = getturtle() >>> pet.fd(50) >>> pet <turtle.Turtle object at 0x...>