Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# cppcodes
CPP programs for beginners
added a new program clock py
17 changes: 17 additions & 0 deletions clock.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
from tkinter import *
from tkinter.ttk import *

from time import strftime

root = Tk()
root.title("Clock")

def time():
string = strftime('%H:%M:%S %p')
label.config(text=string)
label.after(1000, time)

label = Label(root, font=("ds-digital", 50), background = "black", foreground = "red")
label.pack(anchor='center')
time()
mainloop()