Digital Clock in Python | GUI with Tkinter

preview_player
Показать описание
Let's code for a digital clock program in python using Tkinter | Python coding

#python #viralvideo #coding
Рекомендации по теме
Комментарии
Автор

I did it! thank you for your idea bro! keep it up!👏

christianpaloma
Автор

Love it!! Was able to make my own countdown timer and was also my first jump into the tkinter gui

Flash
Автор

# importing whole module
from tkinter import *
from tkinter.ttk import *

# importing 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()

mineplayer
Автор

I did exactly the same code but it does not open ? What am I supposed to do ?

nikitamartiniuk
visit shbcf.ru