Skip to content

saivarun0007/Digital-Clock

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Digital Clock

A simple digital clock application built using Python and Tkinter.

Features:

  • Displays the current time in HH:MM:SS AM/PM format.

  • Updates every 200 milliseconds.

  • Customizable font, background, and text color.

Requirements:

  • Python 3.x (3.10, 3.11, 3.12)

  • Tkinter (comes pre-installed with Python)

Installation:

  1. Clone this repository or download the Digital_Clock.py file.

  2. Ensure you have Python installed.

  3. Run the script using:

    python Digital_Clock.py

Code Overview:

Uses the Tkinter module to create a graphical user interface.

The time.strftime("%H:%M:%S %p") or ("%I:%M:%S %p") function fetches the current time.

The after(200, present_time) method ensures the clock updates every 200 milliseconds.

("%H:%M:%S %p") Snapshot-
snapshots

("%I:%M:%S %p") Snapshot-
snapshots

Customization:

  • Change the font style and size by modifying:

-- python -- Copy -- Edit -- digi_clock = Label(root, font=("algerian", 190), bg="yellow", fg="black")

  • Modify the update interval (currently set to 200 milliseconds) in:

-- python -- Copy -- Edit -- digi_clock.after(200, present_time)

License:

This project is open-source and available for personal or educational use.

About

This Digital Clock program is developed by using PYTHON (Tkinter)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages