Skip to main content

An application that provides a simplified way for children to learn programming

Project description

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 main.py
# Can also install with `pip install .`
# Will provide the `play-turtle` command 

Play Turtle Commands

Forward

  • Syntax
    • Command: forward
    • Parameters: distance
  • What it does
    • The forward command moves the turtle on the screen, drawing a line behind it.
    • The distance parameter tells the turtle how far to move.

Back

  • Syntax
    • Command: back
    • Parameters: distance
  • What it does
    • The back command moves the turtle backward on the screen, drawing a line in front of it.
    • The distance parameter tells the turtle how far to move.

Right

  • Syntax
    • Command: right
    • Parameters: degrees
  • What it does
    • The right command turns the turtle right.
    • The degrees parameter tells the turtle how many degrees to rotate.

Left

  • Syntax
    • Command: left
    • Parameters: degrees
  • What it does
    • The left command turns the turtle left.
    • The degrees parameter tells the turtle how many degrees to rotate.

Speed

  • Syntax
    • Command: speed
    • Parameters: new-speed
  • What it does
    • The speed command sets the turtles drawing speed.
    • The new-speed parameter tells the turtle how fast it should move.

Width

  • Syntax
    • Command: width
    • Parameters: new-width
  • What it does
    • The width command sets the turtles width (in pixels).
    • The new-width parameter specifies what the new width of the turtle should be.

Shape

  • Syntax
    • Command: shape
    • Parameters: new-shape
  • What it does
    • The shape command changes the turtle's shape.
    • The 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

  • Syntax
    • Command: square
    • Parameters: side-length
  • What it does
    • The square command draws a square on the screen
    • The side-length parameter determines how long the sides of the square will be

Circle

  • Syntax
    • Command: circle
    • Parameters: radius
  • What it does
    • The circle command draws a circle on the screen
    • The radius parameter determines how big the circle will be

Color

  • Syntax
    • Command: color
    • Parameters: new-color
  • What it does
    • The color command changes the color of the turtle and of the lines it draws
    • The new-color parameter specifies what color to change to

      See a list of all named colors here

Hide

  • Syntax
    • Command: hide
    • Paramters: none
  • What it does
    • The hide command hides the turtle. It will still draw, it just won't be visible

Show

  • Syntax
    • Command: show
    • Paramters: none
  • What it does
    • The show command shows the turtle if it's hidden. If it's already visible, it does nothing

Begin Fill

  • Syntax
    • Command: begin-fill
    • Paramters: none
  • What it does
    • The begin-fill command will start the fill process using the current color. However, nothing will be filled until end-fill is called.

End Fill

  • Syntax
    • Command: end-fill
    • Paramters: none
  • What it does
    • The 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

  • Syntax
    • Command: bgcolor
    • Paramters: new-color
  • What it does
    • The bgcolor command changes the background color of the canvas
    • The new-color paramter specifies what color it should change to

      See a list of all named colors here

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

PlayTurtle-1.2.0.tar.gz (8.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

PlayTurtle-1.2.0-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file PlayTurtle-1.2.0.tar.gz.

File metadata

  • Download URL: PlayTurtle-1.2.0.tar.gz
  • Upload date:
  • Size: 8.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.2

File hashes

Hashes for PlayTurtle-1.2.0.tar.gz
Algorithm Hash digest
SHA256 e67772ad084df34de9a2a2ddc12075603c07bfaa2fb33c910d759382e99298c1
MD5 92e1b0b7af404acb89c589b48f490223
BLAKE2b-256 03abe4a467c20b340df29b5ff7dd5cb44c94aaa42123a025b9c8df96e98ea7ce

See more details on using hashes here.

File details

Details for the file PlayTurtle-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: PlayTurtle-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 6.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.2

File hashes

Hashes for PlayTurtle-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b055ad4fd9358bc522555bc9fc7db1e8a9b1fedacdce6fbc8c9475edc7adc9a3
MD5 cc8b7ed918b1144054b9d19bc8835782
BLAKE2b-256 415ba338aaca1a2816b5d6982b38960bbcb48dc8596ce5e45226a38ef972df98

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page