-->

Make a Clock using Python 12Hrs Format ||

 Source Code For Clock In Python 

 

Making A Clock In Python Is Not So Hard 

before You Get The Source Code You may have A Look at How The Clock It Is 

digital CLock made by python


So first The Hrs Come Then Min Then Sec The AM/PM And you Also Need To Download The Font and Install so this Clock get This Font 


Quickly Install The Font By Following Steps 


  1. Go To Font Download Website ANd Install The Font (to Go To Download Website by Clicking "Download")
  2. You Will Get A Zip File Named "ds_digital.zip"
  3. Extract That File
  4. a Folder Will Create named "ds_digital" Open It
  5. Then There Is A File Named "DS-DIGI.TTF" Open it 
  6. and You Will See an Install Button On Top Left 

steps to download fonts

And you Are Done..! Your Font Is Install Now Just Copy The Source Code And paste It Into Pycharm IDE By making a clock.py File


The Source Code 

from tkinter import *
from tkinter import *
from tkinter.ttk import *

from time import strftime

root = Tk()
root.title("Clock")

def time():
    string = strftime('%I:%M:%S %p')
    Label.config(text=string)
    Label.after(1000, time)

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

mainloop()




What is a digital clock?



A digital clock is another to a regular analog clock. this type of clock shows numbers to display the time during a digital format, like on a watch, phone, or watch. this can be in both 12 and 24-hour formats, so it’s important for kids to grasp the two before introducing them to a digital clock.



How are children taught to read an analog and digital clock?

Children are first introduced to time at KS1, where they’ll start up by reading the time on an analog clock before moving on to digital clocks.

In year 1, children will gain a basic understanding by learning the hour times, like 8’o'clock. They’ll be taught that if the long clock hand is pointing at 12, and thus the shorter hand is pointed at 8, then this reads 8’o’clock. an honest because of help children gain more confidence with o’clock times is to urge them to read the clock when it reaches an hour time. this may be a wonderful due to help them begin to read an analog clock confidently.

After that, they’ll begin to read half interests, like half past 2. You’ll then teach them the identical principle and explain that when the long hand reaches 6 and thus the shorter hand reaches 2 - this then reads half past 2.


When children reach year 2 they need to be ready to confidently tell the time to five minutes, also as quarter past and quarter to.



Once children have reached year 3, they’ll slowly begin to be introduced to 12 and 24-hour times, further as digital clocks. as an example, they could incline a time like 2:30 so should draw the proper hands on an analogue clock to create now, to denote that they understand the two formats.



Which is the best analog or digital clocks?


An analog clock that's integrated with gears and comes could also be more accurate than a digital one to measure the elapsed time; what more if it is a sweeping used, which might display the time more precisely than a digital clock which generally shows only hours and minutes.