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()
Project details
Release history Release notifications | RSS feed
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.8.tar.gz
(2.1 kB
view hashes)