Python Turtle Tricks

  1. tired of starting everything with turtle.something? You can rename turtle like this:
    t1=turtle.Turtle()
    t1.penup()
    t1.circle(100,360)
  2. Would you like to have a turtle instead of an arrow?
    t1.shape(“turtle”)
  3. Do you like abbreviations?
    pendown() can be pd() like turtle.pd()
    penup() pu()
    forward() pd()
    backward() bk()
    right() rt()
    left() lt()
  4. Do you more than one turtle to draw?
    This sample code has two turtles – t1 and t2. But you could name them anything.
  5. Combo tricks – changing Python window size AND background color – try some of these color codes:

import turtle
turtle.screensize (800,800)
turtle.bgcolor(“orange”)