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.10.tar.gz
(2.2 kB
view hashes)
Built Distribution
Close
Hashes for SSSsnake-0.0.10-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2be0636b6391cb3457c3dc0fbb7d8aebfa3636c041fc3d235be54425430cdbd9 |
|
MD5 | d39acac3473ee0dcdfd0605de46add68 |
|
BLAKE2b-256 | 1aac19aafd0408107c598432972af4fa29d7538dd834b1248ba70f5211d69889 |