Skip to content

Latest commit

 

History

History
 
 

Digital Clock

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Description:

  • This project displays the time in digital clock format
  • For creation of digital clock Using Python, we will need to import Python modules one for creating GUI, font for displaying time and another to get datetime data.
  • For GUI we will use "tkinter module".
  • And to get time and date data we will use "datetime and time".

Procedure:

from tkinter import *
from tkinter import ttk
from tkinter import font
import time
import datetime
  • After importing modules, we will then initialise tkinter
  • Then we will add two functions one for quit another one for running the clock.
  • We can change the background color,font and font size according to our wish.
  • Then run the project the output will show the digital clock in H:M:S format.
  • The format for displaying the time can also be changed according to our wish.

Sample Output:

LGM