PlayTurtle
v2.0.0
Play Turtle provides a way for children to learn programming by moving a turtle on the screen
It provides a subset of commands found in Python's Turtle module to abstract away complicated programming ideas.
There are multiple ways to install Play Turtle
With pip
$ pip install playturtle
# Provides the play-turtle command
Clone the repo and run locally
$ git clone https://github.com/mordy-python/PlayTurtle
$ cd PlayTurtle
$ python playturtle.py
# Can also install with `pip install .`
# Will provide the `play-turtle` command
Forward
Back
Right
Left
Speed
Width
Shape
Square
Circle
Color
Hide
Show
Begin fill
End fill
Bgcolor
forward
distance
forward
command moves the turtle on the screen, drawing a line behind it.distance
parameter tells the turtle how far to move.back
distance
back
command moves the turtle backward on the screen, drawing a line in front of it.distance
parameter tells the turtle how far to move.right
degrees
right
command turns the turtle right.degrees
parameter tells the turtle how many degrees to rotate.left
degrees
left
command turns the turtle left.degrees
parameter tells the turtle how many degrees to rotate.speed
new-speed
speed
command sets the turtles drawing speed.new-speed
parameter tells the turtle how fast it should move.width
new-width
width
command sets the turtles width (in pixels).new-width
parameter specifies what the new width of the turtle should be.shape
new-shape
shape
command changes the turtle's shape.new-shape
parameter specifies what shape should be displayed.
Note: The
new-shape
parameter can only be on of the following: arrow, circle, turtle, square, triangle, classic
square
side-length
square
command draws a square on the screenside-length
parameter determines how long the sides of the square will becircle
radius
circle
command draws a circle on the screenradius
parameter determines how big the circle will becolor
new-color
color
command changes the color of the turtle and of the lines it drawsnew-color
parameter specifies what color to change to
See a list of all named colors here
hide
hide
command hides the turtle. It will still draw, it just won't be visibleshow
show
command shows the turtle if it's hidden. If it's already visible, it does nothingbegin-fill
begin-fill
command will start the fill process using the current color
. However, nothing will be filled until end-fill
is called.end-fill
end-fill
command will fill any shapes drawn in between the begin-fill
command and itself. If there was no begin-fill
command, end-fill
will do nothing.bgcolor
new-color
bgcolor
command changes the background color of the canvasnew-color
paramter specifies what color it should change to
See a list of all named colors here