Created
May 14, 2014 21:38
-
-
Save mattr555/43f3bc8e037d1ac6982c to your computer and use it in GitHub Desktop.
Python logo in LOGO (aka turtle)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from turtle import * | |
def drawPython(): | |
begin_fill() | |
forward(90) | |
circle(50, 90) | |
forward(80) | |
circle(5, 90) | |
forward(140) | |
circle(5, 90) | |
forward(65) | |
rt(90) | |
forward(50) | |
circle(5, 90) | |
forward(105) | |
circle(5, 90) | |
forward(20) | |
lt(90) | |
forward(50) | |
rt(90) | |
forward(50) | |
rt(180) | |
circle(50, 90) | |
rt(180) | |
forward(50) | |
rt(90) | |
forward(50) | |
end_fill() | |
def drawEye(coord): | |
goto(coord) | |
color('#ffffff') | |
setheading(90) | |
forward(15) | |
rt(90) | |
begin_fill() | |
circle(15) | |
end_fill() | |
speed('fastest') | |
color('#3776ab') | |
drawPython() | |
penup() | |
forward(95) | |
rt(90) | |
forward(5) | |
rt(90) | |
color('#ffbc29') | |
drawPython() | |
drawEye((15, 80)) | |
drawEye((85, -130)) | |
hideturtle() | |
done() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment