Play Turtle
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.
Table of Contents
Installation
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
Play Turtle Commands
Forward
- Syntax
- Command:
forward - Parameters:
distance
- Command:
- What it does
- The
forwardcommand moves the turtle on the screen, drawing a line behind it. - The
distanceparameter tells the turtle how far to move.
- The
Back
- Syntax
- Command:
back - Parameters:
distance
- Command:
- What it does
- The
backcommand moves the turtle backward on the screen, drawing a line in front of it. - The
distanceparameter tells the turtle how far to move.
- The
Right
- Syntax
- Command:
right - Parameters:
degrees
- Command:
- What it does
- The
rightcommand turns the turtle right. - The
degreesparameter tells the turtle how many degrees to rotate.
- The
Left
- Syntax
- Command:
left - Parameters:
degrees
- Command:
- What it does
- The
leftcommand turns the turtle left. - The
degreesparameter tells the turtle how many degrees to rotate.
- The
Speed
- Syntax
- Command:
speed - Parameters:
new-speed
- Command:
- What it does
- The
speedcommand sets the turtles drawing speed. - The
new-speedparameter tells the turtle how fast it should move.
- The
Width
- Syntax
- Command:
width - Parameters:
new-width
- Command:
- What it does
- The
widthcommand sets the turtles width (in pixels). - The
new-widthparameter specifies what the new width of the turtle should be.
- The
Shape
- Syntax
- Command:
shape - Parameters:
new-shape
- Command:
- What it does
- The
shapecommand changes the turtle's shape. - The
new-shapeparameter specifies what shape should be displayed.Note: The
new-shapeparameter can only be on of the following: arrow, circle, turtle, square, triangle, classic
- The
Square
- Syntax
- Command:
square - Parameters:
side-length
- Command:
- What it does
- The
squarecommand draws a square on the screen - The
side-lengthparameter determines how long the sides of the square will be
- The
Circle
- Syntax
- Command:
circle - Parameters:
radius
- Command:
- What it does
- The
circlecommand draws a circle on the screen - The
radiusparameter determines how big the circle will be
- The
Color
- Syntax
- Command:
color - Parameters:
new-color
- Command:
- What it does
- The
colorcommand changes the color of the turtle and of the lines it draws - The
new-colorparameter specifies what color to change toSee a list of all named colors here
- The
Hide
- Syntax
- Command:
hide - Paramters: none
- Command:
- What it does
- The
hidecommand hides the turtle. It will still draw, it just won't be visible
- The
Show
- Syntax
- Command:
show - Paramters: none
- Command:
- What it does
- The
showcommand shows the turtle if it's hidden. If it's already visible, it does nothing
- The
Begin Fill
- Syntax
- Command:
begin-fill - Paramters: none
- Command:
- What it does
- The
begin-fillcommand will start the fill process using the currentcolor. However, nothing will be filled untilend-fillis called.
- The
End Fill
- Syntax
- Command:
end-fill - Paramters: none
- Command:
- What it does
- The
end-fillcommand will fill any shapes drawn in between thebegin-fillcommand and itself. If there was nobegin-fillcommand,end-fillwill do nothing.
- The
Bgcolor
- Syntax
- Command:
bgcolor - Paramters:
new-color
- Command:
- What it does
- The
bgcolorcommand changes the background color of the canvas - The
new-colorparamter specifies what color it should change toSee a list of all named colors here
- The
Metadata
Release files for PlayTurtle 3.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| PlayTurtle-3.0.0.tar.gz | 5.9 kB | Without provenance | Details for PlayTurtle-3.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| PlayTurtle-3.0.0-py3-none-any.whl | Python 3 | none | any | Details for PlayTurtle-3.0.0-py3-none-any.whl |
Total release size: 12.9 kB
Release files / PlayTurtle-3.0.0.tar.gz
| Download URL | PlayTurtle-3.0.0.tar.gz |
|---|---|
| Size | 5.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8b2761a25d18c2a05c850e7758b514343229fbb8f53756f1469ead92d9d18c33
|
|
BLAKE2b-256 checksum How to use checksums |
915a1f06e9436b6e3e418576b2256907667187c132946255eef97aed64419b9f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.2
|
Release files / PlayTurtle-3.0.0-py3-none-any.whl
| Download URL | PlayTurtle-3.0.0-py3-none-any.whl |
|---|---|
| Size | 7.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
712dae403588299f4107154691187993fc74061b0d6f133abc87f91a059451b6
|
|
BLAKE2b-256 checksum How to use checksums |
fea3c0649654def388a8e9a45b7e9d2ea983c9d85a9b9cb32e287fee847a61d5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.2
|
Security for PlayTurtle 3.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.