Digital clock using Python



 Step 1 :-  open IDLE and start typing the code.

Code:- 

from tkinter import*

from tkinter.ttk import*

from time import strftime

root Tk(

root.title("clock")

def time():

string strftime(%H:%M:%S %p' )

label.config(text-string)

label.after(1000, time)

label-Label(root, font ("ds-digital",80), background="black", foreground="White") label.pack(anchor='center') 

time()

mainloop()


( Click on the picture for clarity )


Step 2 :- Save the file

Step 3 :- Run the code and get the output.


Hope you got the output.


Watch the video for better understanding.



Subscribe my channel on YouTube and get more ideas ๐Ÿ‘‡

YouTube Link :- https://www.youtube.com/channel/UC8U2tW9d8N_qosD8739Id5Q

Comments

Popular posts from this blog

How to take Google Classroom on Desktop Home screen.

How to Connect Scott user in Oracle database - SQL Language

How to make Colorful spiral using Python