Python Project | Digital Clock In Python Tkinter

Опубликовано: 23 Октябрь 2021
на канале: UGC NET
61
5

Python projects - Make digital clock in Python Tkinter. This is a simple project to get started with Tkinter, which is a built-in package that comes with Python. Tkinter is basically a graphical user interface package. It has great features that can be used to create simple applications. And today we will use it to create our digital clock.
The source code of this program is as follows
....................................................................................................
import tkinter module
from tkinter import *
from tkinter.ttk import *

import strftime function to retrieve system's time
from time import strftime

creating tkinter window
root = Tk()
root.title('Clock')

This function is used to
display time on the label
def time():
string = strftime('%H:%M:%S %p')
lbl.config(text = string)
lbl.after(1000, time)

Styling the label widget so that clock
will look more attractive
lbl = Label(root, font = ('calibri', 40, 'bold'),
background = 'purple',
foreground = 'white')

Placing clock at the centre
of the tkinter window
lbl.pack(anchor = 'center')
time()

mainloop()

............................................................................................................
Subscribe:
   / @computerscienceandapplicat8016  

follow me :   / ugc-net-108943208141515  

blog : https://computersolution2016.blogspot...

youtube channel link:    / @computerscienceandapplicat8016  

#Python #PythonProject #ProjectForStudents #tkintergui #tkintertutorial #tkinterprojects #tkinterinpython #tkinterguitutorial #python2021 #digitalclock #latest #trends


На этой странице сайта вы можете посмотреть видео онлайн Python Project | Digital Clock In Python Tkinter длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь UGC NET 23 Октябрь 2021, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 61 раз и оно понравилось 5 зрителям. Приятного просмотра!