Last active
February 27, 2021 17:50
-
-
Save touatily/279f2f5a84529a5474f33fed059ae308 to your computer and use it in GitHub Desktop.
Algerian flag
This file contains hidden or 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
import turtle | |
turtle.bgcolor("cyan") | |
t = turtle.Turtle() | |
t.speed(1) | |
width = 600 | |
height = 300 | |
t.up() | |
t.goto(-width//2, height//2) | |
t.down() | |
t.color("black", "green") | |
t.begin_fill() | |
for i in range(4): | |
t.fd(width//2) | |
t.right(90) | |
t.end_fill() | |
t.up() | |
t.goto(0, height//2) | |
t.down() | |
t.color("black", "white") | |
t.begin_fill() | |
for i in range(4): | |
t.fd(width//2) | |
t.right(90) | |
t.end_fill() | |
t.color("red", "red") | |
t.left(120) | |
t.up() | |
t.goto(65, 40) | |
t.down() | |
t.begin_fill() | |
t.circle(80, 300) | |
t.right(10) | |
t.circle(61, -285) | |
t.end_fill() | |
t.up() | |
t.goto(0, 10) | |
t.down() | |
t.setheading(0) | |
t.right(15) | |
t.begin_fill() | |
for i in range(5): | |
t.fd(40) | |
t.right(144) | |
t.end_fill() | |
t.hideturtle() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment