Coders Packet


By Krishna Prasad Deekonda

This is a basic python project to create a digital clock GUI Application with 24-hour standard time format and refreshes for every 200ms and gives breif idea how to implement python project


Firstly to create this GUI application we can use any IDE of our choice such as VSCode, PyCharms etc in a virtual environment. For this project we use package Tkinter which provides users with a simple way to create GUI elements using widgets found in the Tk toolkit which can be used as buttons, menus with interactivity and then we write the necessary code for displaying the digital clock using this we can configure and customise our own fonts, background and foreground display colors etc and by this we can run the file and get the desired Application/output - DIGITAL CLOCK which updates/refreshes for every 200 milliseoconds as mentioned in our code


from tkinter import *
from time import strftime
clk = Tk()
clk.title("Military Clock")
lbl = Label(clk, font = ("NewTimesRoman", 90), background = "black", foreground = "white")
lbl.pack(anchor = 'center') def time(): k = strftime('%H:%M:%S') lbl.config(text = k) lbl.after(200, time) time() mainloop()

Download project

Reviews Report

Submitted by Krishna Prasad Deekonda (krishnadeekonda)

Download packets of source code on Coders Packet