Skip to content

Commit 051632c

Browse files
authored
Create main.py
1 parent 43863a5 commit 051632c

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

main.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#This code is to import tkinter libraries remeber to do py install tk!
2+
#This code is under the license of
3+
from tkinter import *
4+
from tkinter.ttk import *
5+
6+
from time import strftime
7+
8+
root = Tk()
9+
root.title("My Awesome Clock")
10+
11+
def time():
12+
string = strftime("%H:%M:%S %p")
13+
label.config(text = string)
14+
label.after(1000, time)
15+
16+
label = Label(root, font = "ds-digital 100", background = "white", foreground = "black")
17+
label.pack(anchor = "center")
18+
19+
time()
20+
21+
mainloop()

0 commit comments

Comments
 (0)