Skip to content

Commit c450e5b

Browse files
authored
Merge pull request #9 from agneya-1402/main
GUI Digital Clock
2 parents 4fbf111 + 4eed103 commit c450e5b

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

DigitalClock.py

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
from tkinter import *
2+
import time
3+
4+
a=Tk()
5+
a.title("Digital Clock")
6+
#a.iconbitmap("clock.ico")
7+
8+
def dc():
9+
time1= time.strftime("%H:%M:%S")
10+
current_time.config(text=time1)
11+
current_time.after(250,dc)
12+
13+
digiClock=Label(a,text="Clock",font=("arial",25,"bold"),bg="blue",fg="white")
14+
digiClock.grid(row=0,column=0)
15+
current_time=Label(a,font=("times new roman",40,"bold"),bg="blue",fg="white")
16+
current_time.grid(row=1,column=0)
17+
dc()
18+
19+
a.mainloop()

README.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
# Python-Projects
22

33
This is a Project focused on Python based codes. Everyone is welcomed to contribute during this Hacktoberfest period.
4+
5+
6+
1. @agneya-1402 : Added Digital Clock using python

0 commit comments

Comments
 (0)