0

Hello I got error in coading by creating clock please anyone solve this code please 🥺 code in discrimination

form tkinter import form tkinter.ttk import form time import strftime root=tk() root.title("clock") def time(): string = strftime('%H:%M:%S:%P') lable.config(text=string) lable.after(1000,time) lable=lable(root,font=("mmsdigitalclock ",80),background = "black",foreground = "cyan") lable.pack(anchor='center') time() mainloop()

11th Jul 2022, 1:59 AM
Mani 143
Mani 143 - avatar
3 ответов
+ 1
ttk was not used. import only if needed. Label not lable
11th Jul 2022, 12:17 PM
Bob_Li
Bob_Li - avatar
0
from tkinter import Tk, Label, mainloop from time import strftime root=Tk() root.title("clock") def time(): string = strftime('%H:%M:%S:%P') lable.config(text=string) lable.after(1000,time) lable=Label(root,font=("mmsdigitalclock ",20),background = "black",foreground = "cyan") lable.pack(anchor='center') time() mainloop()
11th Jul 2022, 12:16 PM
Bob_Li
Bob_Li - avatar