Pesimist_
Legend Member
benim yazdığım bazı kodlar
import turtle
colors = ['red', 'purple', 'blue', 'green', 'orange', 'yellow']
turtle.speed(100)
t = turtle.Pen()
turtle.bgcolor('black')
for x in range(360):
t.pencolor(colors[x%6])
t.width(x/100 + 1)
t.forward(x)
t.left(59)
import tkinter as tk
def topla():
s1 = int(sayi1.get())
s2 = int(sayi2.get())
sonuc['text'] = str(s1+s2)
def cikar():
s1 = int(sayi1.get())
s2 = int(sayi2.get())
sonuc['text'] = str(s1-s2)
def carp():
s1 = int(sayi1.get())
s2 = int(sayi2.get())
sonuc['text'] = str(s1*s2)
def bol():
s1 = float(sayi1.get())
s2 = float(sayi2.get())
sonuc['text'] = str(s1/s2)
#pencere
pencere = tk.Tk()
pencere.geometry("300x300")
sayi1 = tk.Entry(width=10)
sayi1.place(x=20,y=20)
sayi2 = tk.Entry(width=10)
sayi2.place(x=100,y=20)
sonuc = tk.Label(text="Sonuc",bg="gray")
sonuc['font'] = "Verdana 12 bold"
sonuc['fg'] = "#0000FF" #hex code renk tanımlamasını kabul eder
sonuc.place(x=180,y=20)
btopla = tk.Button(text="+",font="Verdana 18 bold", command=topla).place(x=20,y=50)
bcikar = tk.Button(text="-",font="Verdana 18 bold", command=cikar).place(x=80,y=50)
bcarp = tk.Button(text="x",font="Verdana 18 bold", command=carp).place(x=140,y=50)
bbol = tk.Button(text="/",font="Verdana 18 bold", command=bol).place(x=200,y=50)
pencere.mainloop()
Mesajlar sistem tarafından otomatik olarak birleştirildi:
import turtle
colors = ['red', 'purple', 'blue', 'green', 'orange', 'yellow']
turtle.speed(100)
t = turtle.Pen()
turtle.bgcolor('black')
for x in range(360):
t.pencolor(colors[x%6])
t.width(x/100 + 1)
t.forward(x)
t.left(59)
Mesajlar sistem tarafından otomatik olarak birleştirildi:
import tkinter as tk
def topla():
s1 = int(sayi1.get())
s2 = int(sayi2.get())
sonuc['text'] = str(s1+s2)
def cikar():
s1 = int(sayi1.get())
s2 = int(sayi2.get())
sonuc['text'] = str(s1-s2)
def carp():
s1 = int(sayi1.get())
s2 = int(sayi2.get())
sonuc['text'] = str(s1*s2)
def bol():
s1 = float(sayi1.get())
s2 = float(sayi2.get())
sonuc['text'] = str(s1/s2)
#pencere
pencere = tk.Tk()
pencere.geometry("300x300")
sayi1 = tk.Entry(width=10)
sayi1.place(x=20,y=20)
sayi2 = tk.Entry(width=10)
sayi2.place(x=100,y=20)
sonuc = tk.Label(text="Sonuc",bg="gray")
sonuc['font'] = "Verdana 12 bold"
sonuc['fg'] = "#0000FF" #hex code renk tanımlamasını kabul eder
sonuc.place(x=180,y=20)
btopla = tk.Button(text="+",font="Verdana 18 bold", command=topla).place(x=20,y=50)
bcikar = tk.Button(text="-",font="Verdana 18 bold", command=cikar).place(x=80,y=50)
bcarp = tk.Button(text="x",font="Verdana 18 bold", command=carp).place(x=140,y=50)
bbol = tk.Button(text="/",font="Verdana 18 bold", command=bol).place(x=200,y=50)
pencere.mainloop()