Skip to content

Commit 8cedf4e

Browse files
Create clock,py
1 parent 3ebe589 commit 8cedf4e

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

Clock project/clock.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
from tkinter import *
2+
from tkinter.ttk import *
3+
from time import strftime
4+
root = Tk()
5+
root.title("Clock")
6+
def time():
7+
string = strftime('%H:%M:%S %p')
8+
label.config(text = string)
9+
label.after(1000, time)
10+
label = Label(root, font=("ds-digital", 80), background = "black", foreground = "cyan")
11+
label.pack(anchor = 'center')
12+
time()
13+
mainloop()

0 commit comments

Comments
 (0)