turtle.end_poly()

turtle.end_poly() Stop recording the vertices of a polygon. Current turtle position is last vertex of polygon. This will be connected with the first vertex.

turtle.down()

turtle.down() Pull the pen down – drawing when moving.

turtle.done()

turtle.done() Starts event loop - calling Tkinter’s mainloop function. Must be the last statement in a turtle graphics program. Must not be used if a script is run from within IDLE in -n mode (No subprocess) - for interactive use of turtle graphics. >>> screen.mainloop()

turtle.dot()

turtle.dot(size=None, *color) Parameters: size – an integer >= 1 (if given) color – a colorstring or a numeric color tuple Draw a circular dot with diameter size, using color. If size is not given, the maximum of pensize+4 and 2*pensize is used. >>> turtle.home() >>> turtle.dot() >>> turtle.fd(50); turtle.dot(20, "blue"); turtle.fd(50) >>> turtle.position() (100.00,-0.00) >>> turtle.heading() 0.0

turtle.degrees()

turtle.degrees(fullcircle=360.0) Parameters: fullcircle – a number Set angle measurement units, i.e. set number of “degrees” for a full circle. Default value is 360 degrees. >>> turtle.home() >>> turtle.left(90) >>> turtle.heading() 90.0 Change angle measurement unit to grad (also known as gon, grade, or gradian and equals 1/100-th of the right angle.) >>> turtle.degrees(400.0) >>> turtle.heading() 100.0 >>> turtle.degrees(360) >&g

turtle.distance()

turtle.distance(x, y=None) Parameters: x – a number or a pair/vector of numbers or a turtle instance y – a number if x is a number, else None Return the distance from the turtle to (x,y), the given vector, or the given other turtle, in turtle step units. >>> turtle.home() >>> turtle.distance(30,40) 50.0 >>> turtle.distance((30,40)) 50.0 >>> joe = Turtle() >>> joe.forward(77) >>> turtle.distance(joe) 77.0

turtle.delay()

turtle.delay(delay=None) Parameters: delay – positive integer Set or return the drawing delay in milliseconds. (This is approximately the time interval between two consecutive canvas updates.) The longer the drawing delay, the slower the animation. Optional argument: >>> screen.delay() 10 >>> screen.delay(5) >>> screen.delay() 5

turtle.colormode()

turtle.colormode(cmode=None) Parameters: cmode – one of the values 1.0 or 255 Return the colormode or set it to 1.0 or 255. Subsequently r, g, b values of color triples have to be in the range 0..cmode. >>> screen.colormode(1) >>> turtle.pencolor(240, 160, 80) Traceback (most recent call last): ... TurtleGraphicsError: bad color sequence: (240, 160, 80) >>> screen.colormode() 1.0 >>> screen.colormode(255) >>> screen.colormode() 255 >>

turtle.clone()

turtle.clone() Create and return a clone of the turtle with same position, heading and turtle properties. >>> mick = Turtle() >>> joe = mick.clone()

turtle.clearstamps()

turtle.clearstamps(n=None) Parameters: n – an integer (or None) Delete all or first/last n of turtle’s stamps. If n is None, delete all stamps, if n > 0 delete first n stamps, else if n < 0 delete last n stamps. >>> for i in range(8): ... turtle.stamp(); turtle.fd(30) 13 14 15 16 17 18 19 20 >>> turtle.clearstamps(2) >>> turtle.clearstamps(-2) >>> turtle.clearstamps()