Let's draw Azerbaijani and Turkish flag with Python

Extazİ

Moderatör
20 Haz 2021
2,495
1,464
https://tr.wikipedia.org/wiki/Ekstazi
Hi friends, we will draw a flag with the python on this issue.
66e2lra.jpg

The Turkish flag.
Python:
import turtle
t = turtle.Turtle()
w = turtle.Screen()
w.title("Turkhackteam.org")
w.setup(width=720,height=420)
w.bgcolor("red")
t.up()
t.goto(-100,-100)
t.color('white')
t.begin_fill()
t.circle(120)
t.end_fill()
t.goto(-70,-80)
t.color('red')
t.begin_fill()
t.circle(100)
t.end_fill()
t.goto(0,35)
t.fillcolor("white")
t.begin_fill()
for i in range(5):
    t.forward(150)
    t.right(144)
t.end_fill()
t.goto(-130,-190)
t.color("white")
t.write("Turkhackteam.org", font=("Verdana", 17,"bold"))
t.goto(-999,-0)
w.exitonclick()


Flag of Azerbaijan.
Python:
import turtle
arrow = turtle.Turtle()
def star(x, y, color, length):
    arrow.up()
    arrow.goto(x, y)
    arrow. setheading(157)
    arrow.pendown()
    arrow.begin_fill()
    arrow.color(color)
    for star in range(0, 8):
        arrow.pensize(3)
        arrow.forward(length)
        arrow.right(135)
    arrow.end_fill()

def greensqr():
    arrow.pendown()
    arrow.color('#509e2f')
    arrow.begin_fill()
    arrow.forward(500)
    arrow.right(90)
    arrow.forward(100)
    arrow.right(90)
    arrow.forward(500)
    arrow.right(90)
    arrow.end_fill()
    arrow.penup()

def bluesqr():
    arrow.pendown()
    arrow.color('#00b5e2')
    arrow.begin_fill()
    arrow.forward(300)
    arrow.right(90)
    arrow.forward(500)
    arrow.right(90)
    arrow.forward(100)
    arrow.right(90)
    arrow.forward(500)
    arrow.end_fill()
    arrow.penup()

def redsqr():
    arrow.pendown()
    arrow.color('#ef3340')
    arrow.begin_fill()
    arrow.left(90)
    arrow.forward(100)
    arrow.left(90)
    arrow.forward(500)
    arrow.left(90)
    arrow.forward(100)
    arrow.end_fill()
    arrow.penup()
def drawmoon(x, y, color, radius):
    arrow.penup()
    arrow.goto(x, y)
    arrow.color(color)
    arrow.begin_fill()
    arrow.circle(radius)
    arrow.end_fill()
def text():
    arrow.penup()
    arrow.goto(-565,150)
    arrow.color("Dark green")
    arrow.begin_fill()
    arrow.goto(-565,100)
    arrow.write(('Türkiye & Azerbaycan'), move=False, align="Left", font=("Flux Regular", 19, "normal"))
    arrow.goto(-565,50)
    arrow.write(('İki devlet bir millet'), move=False, align="Left", font=("Flux Regular", 19, "normal"))
    arrow.end_fill()
def text1():
    arrow.goto(-7,200)
    arrow.write(('Azerbaycan'), move=False, align="Left", font=("Flux Regular", 19, "normal"))
    arrow.goto(25,-270)
    arrow.write((""" Turkhackteam.org"""), move=False, align="Left", font=("Flux Regular", 14, "normal"))
for i in range(1):
    greensqr()
    bluesqr()
    redsqr()
    drawmoon(280, 52, "white", 44)
    drawmoon(282, 52, '#ef3340', 36)
    star(297, 33, "white", 40)
    text()
    text1()

turtle.done()
on032xm.png

34rjw32.png


Subject owner: @'CaptainKanka
the original topic: https://www.turkhackteam.org/konular/phyton-ile-azerbaycan-bayragi-turk-bayragi-cizimi.2011327/

 
Üst

Turkhackteam.org internet sitesi 5651 sayılı kanun’un 2. maddesinin 1. fıkrasının m) bendi ile aynı kanunun 5. maddesi kapsamında "Yer Sağlayıcı" konumundadır. İçerikler ön onay olmaksızın tamamen kullanıcılar tarafından oluşturulmaktadır. Turkhackteam.org; Yer sağlayıcı olarak, kullanıcılar tarafından oluşturulan içeriği ya da hukuka aykırı paylaşımı kontrol etmekle ya da araştırmakla yükümlü değildir. Türkhackteam saldırı timleri Türk sitelerine hiçbir zararlı faaliyette bulunmaz. Türkhackteam üyelerinin yaptığı bireysel hack faaliyetlerinden Türkhackteam sorumlu değildir. Sitelerinize Türkhackteam ismi kullanılarak hack faaliyetinde bulunulursa, site-sunucu erişim loglarından bu faaliyeti gerçekleştiren ip adresini tespit edip diğer kanıtlarla birlikte savcılığa suç duyurusunda bulununuz.