Skip to content

Instantly share code, notes, and snippets.

@eneshazr
Created May 26, 2021 12:28
Show Gist options
  • Save eneshazr/6897d327e0b19a4fc7c5f049c2a4aa59 to your computer and use it in GitHub Desktop.
Save eneshazr/6897d327e0b19a4fc7c5f049c2a4aa59 to your computer and use it in GitHub Desktop.
Python Turtle modülü ile Türk Bayrağı Çizimi
import turtle
t = turtle.Turtle()
w = turtle.Screen()
w.title("ŞANLI SANCAK") # Başlık
w.setup(width=720,height=420) # Pencere Boyutu
w.bgcolor("red") # Arka Plan Kırmızı Yap
# İlk daire
t.up()
t.goto(-100,-100) # Fare imleci lokasyonu
t.color('white') # Beyaz renk
t.begin_fill() # Beyaz rengi doldur
t.circle(120) # Çapı
t.end_fill()
# Hilal yapabilmek için ikinci daire
t.goto(-70,-80) # Fare imleci lokasyonu
t.color('red') # Kırmızı renk
t.begin_fill() # Kırmızı rengi doldur
t.circle(100) # Çapı
t.end_fill() # Dolguyu Bitir
# Yıldız için hazırlık
t.goto(0,35)
t.fillcolor("white")
t.begin_fill()
# Yıldız için tekrar eden üçgen çizimi
for i in range(5):
t.forward(150)
t.right(144)
t.end_fill()
t.goto(-130,-190)
t.color("white")
t.write("@yazilimfuryasi", font=("Verdana", 17,"bold"))
# Fare imleci ekranda durup görüntüyü bozmasın diye uzaklaştırıyoruz :)
t.goto(-999,-0)
# Ekrana tıklayınca programın kapanmasını sağlar.
w.exitonclick()
@alonetr
Copy link

alonetr commented Jan 8, 2023

#kodu yazıyorum neden bu hatayı veriyor SyntaxError: invalid syntax

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment