Skip to content

Instantly share code, notes, and snippets.

@mattr555
Created May 14, 2014 21:38
Show Gist options
  • Save mattr555/43f3bc8e037d1ac6982c to your computer and use it in GitHub Desktop.
Save mattr555/43f3bc8e037d1ac6982c to your computer and use it in GitHub Desktop.
Python logo in LOGO (aka turtle)
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