pride.py

Created by nick-koberstein

Created on June 06, 2023

1.11 KB


from turtle import *
colors = ["red","orange","yellow","green","blue"]
colors2 = ["black","brown"]
colors3 = ["pink","white","yellow","yellow","yellow","yellow","yellow"]


def move(x):
    forward(x)
    right(90)

def move2(x):
    forward(x)
    left(180)
    forward(2*x)
    left(90)

def strip():
    pendown()
    pensize(15)
    move(315)
    move(9)
    move(315)
    move2(9)
    penup()
    
def triangle():
    pendown()
    forward(156)
    left(90)
    forward(156)
    left(45)
    penup()
    forward(20)
    left(90)
    forward(220)
    left(135)

penup()
goto(-158,105)
hideturtle()
speed(10)
for col in colors:
    pencolor(col)
    strip()
    strip()
pencolor("purple")
strip()
strip()
pendown()
move(315)
penup()
goto(-90,-110)
left(135)
pensize(20)

for col in colors2:
    pencolor(col)
    triangle()

colormode(255)
pencolor(135,206,250)
pendown()
forward(156)
left(90)
forward(156)
left(45)
penup()
forward(20)
left(90)
forward(220)
left(135)
colormode(1)

for col in colors3:
    pencolor(col)
    triangle()
    
penup()
left(45)
goto(-100,0)
pencolor("purple")
pensize(5)
pendown()
circle(20)

During your visit to our site, NumWorks needs to install "cookies" or use other technologies to collect data about you in order to:

With the exception of Cookies essential to the operation of the site, NumWorks leaves you the choice: you can accept Cookies for audience measurement by clicking on the "Accept and continue" button, or refuse these Cookies by clicking on the "Continue without accepting" button or by continuing your browsing. You can update your choice at any time by clicking on the link "Manage my cookies" at the bottom of the page. For more information, please consult our <a href="https://www.numworks.com/legal/cookies-policy/">cookies policy</a>.