Çözüldü Python girinti hatası

Bu konu çözüldü olarak işaretlenmiştir. Çözülmediğini düşünüyorsanız konuyu rapor edebilirsiniz.

MehmetAbin

Picopat
Katılım
30 Aralık 2020
Mesajlar
24
Yer
Mekan
Daha fazla  
Cinsiyet
Erkek
Meslek
Technopat Blogcusu
Python:
From tkinter import *

sure()

Def islem() :

 İf(durum):

 Global sure.

 Sure[2]+=1

 İf(sure[2]>=100):

 Sure[2]=0

 Sure[1]+=1

 İf(sure[2]>=60):

 Sure[2]=0

 Sure[0]+=1

 Suref= metin. Format(sure[0], sure[1], sure[2])

 Sureetiketi. Configure(text = suref)

 Pencere. After(10, islem)

Def basla():

 Global durum.

 Durum = true.

Def mola():

 Global durum.

 Durum = false.

Def bitir():

 Global sure.

 Sure = [0,0,0]

 Durum = false.

 Sureetiketi. Configure(text:'00:00:00')

Def kapat() :

 pencere.destroy()



Durum = false.

Pencere = Tk()

Pencere. Title('kronometre')

Pencere. Config(bg = 'yellow')

Sure = [0,0,0]

Metin = '{0:02D}:{1:02D}:{2:02D}'

Sureetiketi = label(pencere, text="00:00:00", bg ='yellow', fg = 'Black',font='times 1372')

Sureetiketi. Pack(side= left)

Cerceve =frame(bg = 'Blue')

Cerceve. Pack(side= left, fill="both",expand = true, pady = 10)

Baslad = button(cerceve, text='başlat',width =10 command = basla)

Baslad. Pack(padx = 10, pady = 10)

Molad = button(cerceve, text='mola',width =10 command = mola)

Molad. Pack(padx = 10, pady = 10)

Bitird = button(cerceve, text='bitir',width =10 command = bitir)

Bitird. Pack(padx = 10, pady = 10)

Kapatd = button(cerceve, text='kapat',width =10 command = kapat)

Kapatd. Pack(padx = 10, pady = 10)

islem()

pencere.mainloop()

Python dilini yeni öğrenmeye başladım. bu kodlarla basit bir kronometre yapmayı deneyecektim ama "there's an error in your program: Expected an indented block"
Hatasını verdi.
Yardımcı olursanız sevinirim.😊
 
if Bloklarını daha sonra doldurmak için boş bırakmak istiyorsanız pass kullanın. Bu komutun hiçbir işlevi yok, sadece boşlukları doldurmak için kullanılıyor.
 

Geri
Yukarı