Skip to main content

IPythonDisplayTurtles edited for my schools python courses

Project description

SSSsnake

IPythonDisplayTurtle with addded functionality for our schools python classes.

How to install from a terminal/command prompt: pip install SSSsnake

To install from a jupyter notebook cell: !pip install SSSsnake

How to use:

from IPythonDisplayTurtle import Snake

colours=["red","orange","yellow","green","blue","purple"]
divisions = 12
angle = 360/divisions 

t = Snake(_pendown = 0)
for i in range(divisions):
    if(i%2 == 0):
        t.pendown()
        t.pencolor(colours[int(i/2)%len(colours)])
    else:
        t.penup()
    t.goforward(300/divisions)
    t.turnright(angle)
t.penup()
t.goforward(120)
t.turnright(360)

t.display()

Example Turtle

Binder

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

SSSsnake-0.0.5.tar.gz (3.2 kB view hashes)

Uploaded Source

Built Distribution

SSSsnake-0.0.5-py3-none-any.whl (4.8 kB view hashes)

Uploaded Python 3

Supported by

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