1-
21import tkinter as tk
32import time
43from tkinter .font import Font
@@ -25,21 +24,21 @@ def clocks():
2524'''
2625Here I created a instance of TK class
2726'''
28- window = Tk ()
27+ window = tk . Tk ()
2928# creating a title
3029window .title ("Digital Clock" )
3130# creating background color
3231window .config (bg = "black" )
3332
3433font1 = Font (family = "Arial" , size = 90 , weight = "normal" )
3534# creating a header using Label Widget
36- header = Label (window , text = "Time Clock" , font = font1 , bg = "gray" , fg = "white" )
35+ header = tk . Label (window , text = "Time Clock" , font = font1 , bg = "gray" , fg = "white" )
3736# using grid() to place the header somewhere comfortable in the gui
3837header .grid (row = 1 , column = 2 )
3938'''
4039A clock is being constructed using the Label Widget, which exhibits the current time and is positioned using grid.
4140'''
42- clock = Label (window , font = ("times" , 90 , "bold" ), bg = "blue" , fg = 'white' )
41+ clock = tk . Label (window , font = ("times" , 90 , "bold" ), bg = "blue" , fg = 'white' )
4342clock .grid (row = 2 , column = 2 , padx = 620 , pady = 250 )
4443
4544'''
0 commit comments