Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

import turtle

turtle.shape("turtle")

turtle.speed(10)
turtle.width(5)
turtle.left(90) #heads upward

#===================================================================
#Settings
def FW(distance):
turtle.forward(distance)

def BW(distance):
turtle.backward(distance)

def R(angle):
turtle.right(angle)

def L(angle):
turtle.left(angle)

def MoveL(distance):
turtle.left(90)
FW(distance)

def MoveR(distance):
turtle.right(90)
FW(distance)

def MoveRU(angle,distance):
R(angle)
FW(distance)

def MoveLU(angle,distance):
L(angle)
FW(distance)

def drawLoopTri(x,y):
turtle.speed(100)
for times in range(x):
for triangle in range(3):
FW(400)
L(y)
turtle.speed(10)

def drawLoopCir(times,largeness): #Unused


turtle.speed(50)
for time in range(times):
for circle in range(360):
FW(largeness)
L(1)
turtle.speed(10)

def pd():
turtle.pendown()

def pu():
turtle.penup()

def drawP():
FW(250)
MoveRU(45, 50)
MoveRU(45, 100)
MoveRU(90, 100)
MoveRU(45, 50)
MoveRU(45, 60)
MoveL(100)
MoveRU(45,80)

def drawA():
turtle.setheading(225)
FW(100)
BW(100)
turtle.setheading(90)
FW(200)
MoveR(105)
MoveRU(60,60)
MoveRU(30,50)
MoveR(170)
BW(170)
L(90)
FW(100)

def drawT():
turtle.setheading(90)
FW(240)
MoveL(200)
MoveR(50)
MoveR(330)
MoveR(50)
MoveR(70)
MoveL(240)
MoveR(60)

def starA(line):
turtle.setheading(90)
MoveL(line/2)
R(180)
for times in range(5):
FW(line)
R(145)

#===================================================================
#Background
turtle.bgcolor("#fffcb7")

pu()
turtle.setx(100)
turtle.sety(-100)

pd()
turtle.color("#7caeff")
drawLoopTri(20,130)
pu()

#================================
#Letter P Filling

turtle.setx(-250)
turtle.sety(-200)

turtle.setheading(90)
pd()
turtle.color("#ffb254")
turtle.begin_fill()
drawP()
turtle.end_fill()
pu()

#================================
# Letter P Linework
turtle.setx(-250)
turtle.sety(-200)

turtle.setheading(90)
pd()
turtle.width(10)
turtle.color("#e28636")
drawP()
FW(50)
turtle.width(5)
pu()

#================================
#Letter A
turtle.setx(-70)
turtle.sety(-200)

turtle.setheading(90)
pd()
turtle.color("#59aa31")
turtle.width(20)
drawA()

#================================
#Letter T Filling

turtle.width(10)
MoveL(40)
turtle.color("#a18eff")
FW(50)

turtle.begin_fill()
drawT()
turtle.end_fill()

#================================
#Letter T Linework

turtle.color("#7054ff")
turtle.width(15)
drawT()
pu()

#================================
#1003
turtle.width(5)
turtle.color("#ffbb00")
turtle.goto(-300,280)
pd()
#Number 1
turtle.setheading(0)
FW(5)
MoveR(20)
MoveR(5)
turtle.setheading(0)
FW(10)
pu()
FW(10)

Number 0s
#
def drawzero():
pd()
FW(10)
for times in range(2):
MoveL(20)
MoveL(10)

pu()
FW(10)

drawzero()
drawzero()

#Number 3
pd()
FW(10)
for times in range (2):
MoveL(10)
R(180)
FW(10)
for times in range (2):
MoveL(10)
pu()
#================================

# STARS
turtle.goto(0,250)
turtle.color("#ff3a3a")
pd()
turtle.begin_fill()
starA(50)
turtle.end_fill()
pu()

turtle.goto(-100,250)
turtle.color("#ff993a")
pd()
turtle.begin_fill()
starA(50)
turtle.end_fill()
pu()

turtle.goto(100,250)
turtle.color("#f8ff3a")
pd()
turtle.begin_fill()
starA(50)
turtle.end_fill()
pu()

turtle.goto(-50,200)
turtle.color("#58ff3a")
pd()
turtle.begin_fill()
starA(50)
turtle.end_fill()
pu()
turtle.goto(50,200)
turtle.color("#3abdff")
pd()
turtle.begin_fill()
starA(50)
turtle.end_fill()
pu()

#================================
turtle.exitonclick()

You might also like