Last active
February 6, 2023 18:11
-
-
Save jai-dewani/8701a78c77f9b30585fa7b74bd03fe58 to your computer and use it in GitHub Desktop.
A python script that created a pride flag using 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 * | |
colors = ["red","orange","yellow","green","blue","purple"] | |
def move(x): | |
forward(x) | |
right(90) | |
def strip(): | |
pendown() | |
begin_fill() | |
move(800) | |
move(100) | |
move(800) | |
move(100) | |
end_fill() | |
penup() | |
if __init__=="__main__" | |
speed(8) | |
penup() | |
goto(-400,300) | |
hideturtle() | |
for col in colors: | |
color(col,col) | |
strip() | |
right(90) | |
forward(100) | |
left(90) | |
input() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
this is awesome! I think I'll use this during a fun team exercise—thanks!