Make a Clock using Python | Python Project

Поділитися
Вставка
  • Опубліковано 30 лис 2024

КОМЕНТАРІ • 1,1 тис.

  • @emranevan
    @emranevan 4 роки тому +618

    To make the clock format 12 hrs. Simply change the strftime('%H:%M:%S %p') to strftime('%I:%M:%S %p').

    • @karanjitsinghrandhawa445
      @karanjitsinghrandhawa445 4 роки тому +9

      Do we need to install tkinter like in the terminal pip install method or Directly import it in the code?

    • @emranevan
      @emranevan 4 роки тому +24

      @@karanjitsinghrandhawa445 tkinter comes with python. You don't need to install it via terminal. Just import it in the code directly.

    • @karanjitsinghrandhawa445
      @karanjitsinghrandhawa445 4 роки тому +3

      @@emranevan ok thank you

    • @shrutithange7309
      @shrutithange7309 4 роки тому +2

      Thank u... Thank u so much 4 this.... 🤗🤗🤗🤗🤗

    • @waltuh4
      @waltuh4 4 роки тому +2

      Thanks

  • @yaswanthg5518
    @yaswanthg5518 4 роки тому +457

    Your keyboard sounds are so satisfying.....

    • @moontasirmoon5991
      @moontasirmoon5991 4 роки тому +6

      What is the name of your keybord??🥰

    • @Jxrdy
      @Jxrdy 4 роки тому +12

      @@moontasirmoon5991 KEYBOARD JOHN CENA!

    • @lordkopi603
      @lordkopi603 4 роки тому +5

      @@moontasirmoon5991 mechanical keyboard blue switch

    • @mr.curious1714
      @mr.curious1714 3 роки тому +2

      yes man what a nice and satisfying keyboard

    • @subomsingha
      @subomsingha 3 роки тому +2

      Yeahh❄like ur sound.. ^^

  • @ra1xfreroog692
    @ra1xfreroog692 3 роки тому +11

    Thank you sir I am a 6th grade student who is interested in python your course helped me in creating my first python program. Please upload video's more like this

  • @pushpendraverma1554
    @pushpendraverma1554 3 роки тому +217

    My life's first successful project (:>

  • @abhijith9381
    @abhijith9381 3 роки тому +36

    My first successful project on phyton. Feels great..... Thank you again for the video. Sir your explanation was good. Good video.. And precise explanation also neat work

    • @arunkumarp5165
      @arunkumarp5165 2 роки тому +1

      Bro what did you taken in Tk

    • @kingproductions2331
      @kingproductions2331 2 роки тому

      Hey man, I am going to do it later today, so exited, I was wondering how you were going with coding lately
      Are you getting better at coding

    • @reallifehunt7313
      @reallifehunt7313 2 роки тому +1

      Im currently making a Operating system, Its a app but if you fullscreen it, it feels like a operating syystem

    • @kingproductions2331
      @kingproductions2331 2 роки тому

      @@reallifehunt7313 bro that's insane

    • @reallifehunt7313
      @reallifehunt7313 2 роки тому

      @@kingproductions2331 thanks bro

  • @bhavinwandre5607
    @bhavinwandre5607 3 роки тому +9

    Your keyboard sounds great 👍 👌 😀 😄 🙂 😏 👍 👌 😀 😄

  • @alanbrewer4710
    @alanbrewer4710 3 роки тому +31

    Damn, that feels good to finally start and finish a project! Never been so happy to see a clock pop up on my screen!
    Thank you for the video

    • @maxson5815
      @maxson5815 3 роки тому +1

      @Alan Brewer can u help me with my issue ?

    • @Tillychewz
      @Tillychewz 2 роки тому

      @@maxson5815 I may be able to.

  • @drewalexander348
    @drewalexander348 2 роки тому +1

    That quick!? It took me a whole 5 hours to make a clock in Java!

  • @JoJo-164
    @JoJo-164 3 роки тому +25

    I’m surprised you made a program this early in the morning! I’m very impressed!

    • @dubbedanbis3135
      @dubbedanbis3135 3 роки тому

      actually brother, he is doing at pm, not am, check the properly again and if you are talking video's release time then simple, he made the video yesterday evening/night and woke up at morning and uploaded it, common sense brother

    • @self-proclaimedanimator
      @self-proclaimedanimator 3 роки тому

      @@dubbedanbis3135 no man I think he is talking about the clock he just made showed 1 am

    • @dubbedanbis3135
      @dubbedanbis3135 3 роки тому

      @@self-proclaimedanimator hmm maybe

  • @Ayash.2010
    @Ayash.2010 3 роки тому +5

    Sir I didn't install the Ds- Digital font but still I didn't got any errors. Wonderful tutorial, great tutorial.

    • @luchi4_idk
      @luchi4_idk 2 роки тому

      Ds-Digital was just an example. you dont need to install it. have a nice day

    • @luchi4_idk
      @luchi4_idk 2 роки тому

      btw you can use any font you want

  • @danielagyei9987
    @danielagyei9987 3 роки тому +16

    thanks, man. I just wished you explained the terms... Btw, many thanks

  • @Keerthinithya
    @Keerthinithya Рік тому

    Wow....its awee...frst tim felt very happy to run this program....this motivates to do more in python..denksss for the vdo🎉❤

  • @mxgicjustice
    @mxgicjustice 3 роки тому +3

    my first python project, thanks so much evan

  • @jrm3488
    @jrm3488 3 роки тому +46

    Very good project I was able to follow along and actually finish it!

  • @Param3021
    @Param3021 4 роки тому +10

    Thanks bro it will help in my future projects

  • @matkosimic9279
    @matkosimic9279 2 роки тому +2

    My first successful project in python! Thank's man!

  • @mrstef0791
    @mrstef0791 3 роки тому +3

    Traceback (most recent call last):
    File "/Users/mrstef07/Documents/clock.py", line 15, in
    Label.pack(anchor='center')
    TypeError: Pack.pack_configure() missing 1 required positional argument: 'self'

    • @sniper7488
      @sniper7488 2 роки тому

      Label.pack(anchor='center')
      Mistake:
      You wrote a capital 'L' in label.pack
      correct line:
      label.pack(anchor='center')

  • @pradeepkalshyan229
    @pradeepkalshyan229 3 роки тому +1

    That's unbelievable sir
    Thanku soo much sir 🤠🤠🤠🤠🤠😌😌😌😌😌

  • @zikya1107
    @zikya1107 2 роки тому +6

    Your step by step are easy to follow even for a newbie like me. Thanks for nice tutorial!!

    • @celebstoday3560
      @celebstoday3560 Рік тому

      #youtubeshorts #programmingmemes #programmers #ytshorts
      ua-cam.com/users/shortsqsjSwhT6DlY?feature=share

    • @zikya1107
      @zikya1107 Рік тому

      @@celebstoday3560 ??

  • @sandeeplouis1802
    @sandeeplouis1802 2 роки тому

    Successfully done on first try thanks.with out downloading ds digital it's work.

  • @ganjisrinivas7161
    @ganjisrinivas7161 3 роки тому +10

    Hats off to you sir..👏
    Amazing..
    I thought it wouldn't work..
    But I given a trial..
    To my surprise..it worked..
    Thank you so much sir..
    Expecting more like above...

    • @CodingWithEvan
      @CodingWithEvan  3 роки тому +2

      Thank you. You'll find more videos like this on my channel.

    • @character_tt1680
      @character_tt1680 2 роки тому

      @@CodingWithEvan which python did you use? Please help

  • @schinchan6686
    @schinchan6686 3 роки тому +2

    IT WORKED, MY FIRST PROJECT. THANKS !!! I INSTANTLY LIKED AND SUBSCRIBED.

  • @zombiekiller7101
    @zombiekiller7101 3 роки тому +20

    Instead of calling time, create a function to increase the value of the seconds variable by 1 at each call, and check if second = 60 then increase minute by 1 and reset second to 0 similarly do this for hour.
    This is more optimised and also allows us to add a option to change time

  • @jayavantkamesh963
    @jayavantkamesh963 2 роки тому

    Very nice project and this is my first project

  • @aaryansingh5719
    @aaryansingh5719 3 роки тому +6

    I have created my own search engine, virtual assistant, screen recorder 😎

    • @andrazsraka3941
      @andrazsraka3941 3 роки тому +1

      and here you are, copying how to make a simple clock like all of us

    • @aaryansingh5719
      @aaryansingh5719 3 роки тому +1

      @@andrazsraka3941 no I'm here to clear my doubts

    • @ishanop9959
      @ishanop9959 3 роки тому

      @@aaryansingh5719 by which language? python or c

  • @mayankjatiya6868
    @mayankjatiya6868 2 роки тому +1

    Finally my first python project complete successfully

  • @saadabdullah1850
    @saadabdullah1850 3 роки тому +5

    Great video. Appreciate the effort by this person

  • @WorldSecrets42
    @WorldSecrets42 2 роки тому

    i did it and it worked i will go and learn how to convert to executable file right now thank you and i really appreciate🥰 this knowledge

  • @santinopayade4032
    @santinopayade4032 3 роки тому +1

    Hippity Hoppity,
    Your code is now my property~

  • @deepikajain1733
    @deepikajain1733 3 роки тому +5

    Thanks bro it helped me to learn something new

  • @georgealhassan8149
    @georgealhassan8149 2 роки тому

    It worked so well I just had to come back and like 👏

  • @kumarvishal38
    @kumarvishal38 4 роки тому +6

    Amazing bhai love from bihar

  • @shadabmathematics9672
    @shadabmathematics9672 3 роки тому

    Thanks @Evan sir I am looking more such project in pycharm ......1st succesful project in pycharm

  • @darkghostrider2014
    @darkghostrider2014 3 роки тому +3

    Thank you Man. This was my first code and because of you it was successful

  • @camman345268baby
    @camman345268baby 2 роки тому

    Excellent video you are a superb teacher

  • @Rvindra629
    @Rvindra629 3 роки тому +7

    I'm very much excited after making my first python project, thanks for creating such kind of videos. 😊😊

  • @rishiratanpandey3670
    @rishiratanpandey3670 3 роки тому

    No click bait really good

  • @iravaidya1467
    @iravaidya1467 3 роки тому +9

    Me before even knowing a thing of coding: Let's learn coding I will make a website
    After I know: Learning a clock because my website isn't working
    Like if it happened with you

    • @whyeatallchimkennuggies7505
      @whyeatallchimkennuggies7505 3 роки тому +2

      😂Lmao u do know that this is a python tutorial right?? Website design is html so this tutorial doesn’t even use the same programming language as your site so this tutorial will not help you with your site 😂😂 you really don’t know a thing about coding 🤣🤣

    • @iravaidya1467
      @iravaidya1467 3 роки тому +2

      @@whyeatallchimkennuggies7505 I just commented randomly. I know python

  • @xxGamerKidx
    @xxGamerKidx 2 роки тому

    Nice this is my first ever project in python

  • @jacklee6106
    @jacklee6106 3 роки тому +62

    For Python3:
    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 100", background = "dark blue", foreground = "green")
    label.pack(anchor = "center")
    time()
    mainloop()

    • @jagannathan4874
      @jagannathan4874 2 роки тому +3

      ttk is no module names🥺

    • @luffiing1148
      @luffiing1148 2 роки тому +6

      thanks but whats the difference between this and the one in the video?

    • @haadidaboss5992
      @haadidaboss5992 2 роки тому +4

      @@luffiing1148 there are differences, if u are a real coder, u would see them in a second

    • @_.Jac0b_
      @_.Jac0b_ 2 роки тому +5

      i had these errors can you help find the solution to these
      Traceback (most recent call last):
      File "C:\Users\iakob\PycharmProjects\MainProject1\main.py", line 16, in
      time()
      File "C:\Users\iakob\PycharmProjects\MainProject1\main.py", line 10, in time
      string = strftime('%H:%M:%S %P')
      ValueError: Invalid format string

    • @akki2.o236
      @akki2.o236 2 роки тому +6

      @@_.Jac0b_ the p in the format of clock should be lower case

  • @omar_alaswad
    @omar_alaswad 2 роки тому +2

    I did twice and it failed but then I gave of another try and it worked man thanks I did my first python project 😃

  • @sucreationstudio5752
    @sucreationstudio5752 3 роки тому +4

    label = label(root, font=("DS-Digital",80), ba7, in ckground = "black", foreground = "cyan") ckground = "black", foreground = "cyan")
    NameError: name 'label' is not defined

    • @ksunilwelcomes
      @ksunilwelcomes 3 роки тому +3

      L should be capital..Label(root,...

    • @hamzaaouni34
      @hamzaaouni34 3 роки тому +1

      Change label to Label
      copy this :
      Label.config(text=string)
      Label.after(1000, time)
      Label = Label(root, font=("ds-digital", 80), background = "black", foreground = "cyan")
      Label.pack(anchor='center')

    • @RaiyanShahriar438
      @RaiyanShahriar438 3 роки тому +2

      @@hamzaaouni34 the clock is not showing but code is correct no error . what's the problem?

  • @menudikarathnawibhushana1814
    @menudikarathnawibhushana1814 2 роки тому +2

    Thank you so much!! This is my first python project. Feels great after finishing this!!!

  • @ايادمحمد-ط6ط8ث
    @ايادمحمد-ط6ط8ث 3 роки тому +3

    Traceback (most recent call last):
    File "E:\python PR\main.py", line 13, in
    labe1 = Labe1(root,font=("ds-digital",80),background = "black",foreground = "cyan")
    NameError: name 'Labe1' is not defined

  • @s.devadathan4476
    @s.devadathan4476 3 роки тому

    Thank you so much bro....
    All other video recommendations are so long...
    Thanks a lot bro................

  • @sureshk12888
    @sureshk12888 3 роки тому +6

    Amazing and motivating

  • @technology-sg6mu
    @technology-sg6mu 3 роки тому +1

    Hey awesome it really works feel better thanks a lot bro ..........................................

  • @ayushrai3266
    @ayushrai3266 3 роки тому +3

    15th line giving error
    label.pack(anchor='center')
    syntaxError: invalid syntax
    Please give me.solution
    It is my first python program

    • @jeremiahcuthbert1300
      @jeremiahcuthbert1300 2 роки тому

      you ever figure it out i am stuck in the same part

    • @deepikammp2176
      @deepikammp2176 2 роки тому +1

      @@jeremiahcuthbert1300 remove centre, instead type'n' , problem resolved

  • @khaoulaelkeibi3155
    @khaoulaelkeibi3155 3 роки тому +1

    Thanks man that was helpful
    Now i can use my own clock to adjust my time

  • @baborsregime9922
    @baborsregime9922 3 роки тому +8

    How the viewers are getting the keyboard sound satisfying

  • @culturalbadboy
    @culturalbadboy Рік тому +1

    Wow bro you are from Bangladesh
    Im too!

  • @Silent0Noiz
    @Silent0Noiz 3 роки тому +4

    Here are couple issues I had which is why the successful clock program did not work for me initially.
    1. Be sure the computer you are using to write program on, is connected to internet as some libraries have to be installed while writing program.
    2. On line 6 >>>> root = TK() root = Tk()

  • @overpowertps22
    @overpowertps22 3 роки тому +1

    You are genius dude!

  • @dharmikpanna2590
    @dharmikpanna2590 3 роки тому +5

    When I run they show
    NameError: name 'TK' is not defined

  • @elielmurmu
    @elielmurmu 2 роки тому +1

    Thank you very much! A simple and perfect demonstration for beginners.

  • @prathamsunnal3950
    @prathamsunnal3950 4 роки тому +5

    bro if possible pls explain the code a little bit cause for beginners its hard to understand , but overall the code is lit

  • @muradarif7373
    @muradarif7373 2 роки тому +1

    Thank you for such a beatiful and understandable project Mr.Evan

  • @nvpszoom4306
    @nvpszoom4306 4 роки тому +4

    I am using linux to use pycharm so can you please tell me how to install the font provided by you in linux ? please help i am stuck in between the process.

    • @pohna7618
      @pohna7618 4 роки тому +1

      fonts.google.com, and press download, then open the folder called ttf o otf idk. thats it

  • @leagueamw6420
    @leagueamw6420 3 роки тому +8

    The real code is
    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 = "cyan")
    label.pack(anchor='center')
    time()
    mainloop()

    • @hansikajayalath6273
      @hansikajayalath6273 2 роки тому +1

      This one worked for me. The Video's code did not run

    • @thelost3rdroundofsurf407
      @thelost3rdroundofsurf407 2 роки тому

      This worked i just have two small issues, for some reason Visual Studio Code is giving me this error "Tk is deprecated and may be removed in a future release. Please don't rely on it. Set TK_SILENCE_DEPRECATION=1" and my clock background isn't black but it did work once i used as line one.

    • @azhar___000
      @azhar___000 2 роки тому +1

      thans bhai tere wazh se hi project bna ye vidoe faltu h sala bhut error thi

  • @bhavyachhabra3190
    @bhavyachhabra3190 3 роки тому +1

    thanks for the video Brooo
    it helped me a lot

  • @himanshushrestha5535
    @himanshushrestha5535 3 роки тому +4

    great tutorial bro! thank you!

  • @smandavi185
    @smandavi185 11 місяців тому

    Thank you so much sir,
    I have done successfully .❤❤😊😊

  • @moontasirmoon5991
    @moontasirmoon5991 4 роки тому +4

    What is the name of your keybord?🥰

  • @musicaethestic6562
    @musicaethestic6562 3 роки тому +7

    File "/data/user/0/ru.iiec.pydroid3/files/temp_iiec_codefile.py", line 12
    label.after(1000, time)
    ^
    IndentationError: unindent does not match any outer indentation level

  • @drama_lvl1
    @drama_lvl1 2 роки тому

    I come near to my own project thanks to your clock tutorial :D
    I was coding the clock first then I coded how many seconds I've to wait until my birthday :D :P

  • @codewithyug1129
    @codewithyug1129 3 роки тому +4

    Nice video. I have a question. Why use the time module when we can use datetime

  • @rohaanansari9820
    @rohaanansari9820 2 роки тому

    thanks this really worked and looks cool by making a clock by myself

  • @avinashgt
    @avinashgt 4 роки тому +3

    thank you so much its working

  • @salimonuemmanuel8865
    @salimonuemmanuel8865 Рік тому

    It worked at first run.Thanks

  • @ANILKUMAR-if2wv
    @ANILKUMAR-if2wv 4 роки тому +3

    Hi good video, how to start with python script?

    • @CodingWithEvan
      @CodingWithEvan  4 роки тому +3

      Download and install Python from here : www.python.org/
      Then download and install Pycharm from here : www.jetbrains.com/pycharm/
      Then you can start with the projects.
      If you want a detailed video on how to get started with python then let me know.

    • @ANILKUMAR-if2wv
      @ANILKUMAR-if2wv 4 роки тому +1

      @@CodingWithEvan thanks, I have installed both of them. Yeah, I would like to have detailed videos to get start... Could you please share?

  • @goldenp4391
    @goldenp4391 2 роки тому

    thanks bro just got fascinated

  • @user-yd4zc6lt8z
    @user-yd4zc6lt8z 4 роки тому +3

    Sir can I make it play whenever I turn on my pc? If yes then how?

    • @CodingWithEvan
      @CodingWithEvan  4 роки тому +3

      yes you can, there are many ways to do this.
      you can check this thread for reference, stackoverflow.com/questions/4438020/how-to-start-a-python-file-while-windows-starts

    • @user-yd4zc6lt8z
      @user-yd4zc6lt8z 4 роки тому

      @@CodingWithEvan thanks man

  • @IRONMAN36554
    @IRONMAN36554 2 роки тому

    wow bro i imagine how gonna work this i have some ideas about but nothin you teached how to make that and lot of help me to begin my python scripting imagine some day i.m trying to become master on that ! RESPECT

  • @mohamadazman8114
    @mohamadazman8114 2 роки тому

    you earned another
    subscriber

  • @samyaksancheti764
    @samyaksancheti764 3 роки тому +1

    Very nice video ...

  • @Moflia2
    @Moflia2 Рік тому

    This was a cool project! I didn't want to download any new fonts and instead just used "Ariel" for mine, so you can used any of the already installed windows fonts by using their name.

  • @snehagupta7035
    @snehagupta7035 3 роки тому

    Your video is really helpful sir
    Thank you 👍

  • @sir-jjuan8197
    @sir-jjuan8197 2 роки тому

    Thanks very much man! I followed the tutorial and it works!!

  • @manowaragroup493
    @manowaragroup493 2 роки тому

    LOVE FROM BANGLADESH 😇

  • @anrodrigues2011
    @anrodrigues2011 3 роки тому +1

    I learn so much in this video thanks you

  • @studentcode9356
    @studentcode9356 3 роки тому +2

    Wow, this is impressive. Thank you.

  • @kanaksharma5979
    @kanaksharma5979 3 роки тому

    Your channel really upload great videos 👍👍👍👍👍👍👍👍👍

  • @dhanushtejvunnam2836
    @dhanushtejvunnam2836 3 роки тому

    your videos made me to hit the subscribe button

  • @yaasmiinnuhaa8551
    @yaasmiinnuhaa8551 3 роки тому

    thanks for making this tutorial, it's really easy to follow along.....

  • @tatsuo3193
    @tatsuo3193 2 роки тому

    This video is very simple and very easy to follow, thanks bro.

  • @riseandshine2116
    @riseandshine2116 3 роки тому

    Thank you buddy .itz successfully done as I changed %H TO %I .

  • @sesankrishnan2264
    @sesankrishnan2264 3 роки тому +1

    this vedio is very useful for me how to make a python clock thk u

  • @TruthSeeker7101
    @TruthSeeker7101 3 роки тому

    Thank you so much wonderful video...!!

  • @farzadtafreem6414
    @farzadtafreem6414 3 роки тому +1

    Thanks, man this was a great project and it will be very useful next time I try to make a clock, again Thanks

  • @alyapsputri5528
    @alyapsputri5528 3 роки тому

    Thankyou! This is very helpful for my first python project in my class

  • @manohartimothy5825
    @manohartimothy5825 2 роки тому

    thanks so much.... I would like to see some web applications with python with django and mysql together.....manohar

  • @cubingcafe1908
    @cubingcafe1908 3 роки тому

    Nice Work

  • @jignesh1975
    @jignesh1975 2 роки тому

    i did this myself and finished it! this is my first cool pythin project i did

  • @wahyuangga4023
    @wahyuangga4023 3 роки тому +1

    Thanks god is work. Thank you for this videos im newbie in phyton language🙏🙏🙏🙏

  • @ahmdhadi7493
    @ahmdhadi7493 3 роки тому +1

    tnx bruv , done subscribing! :)

  • @meriemhaddad5354
    @meriemhaddad5354 2 роки тому

    It was easy, I finished it in a minute ! , thank you for this video.

  • @soumyaverma3142
    @soumyaverma3142 2 роки тому

    Wow fantastic pro✌✌

  • @D-Coder-
    @D-Coder- 3 роки тому +1

    Thanks For the code bro.

  • @jordanmusleh6305
    @jordanmusleh6305 3 роки тому

    Nice more please..!!!🙏🙏🙏

  • @Chandu27-M
    @Chandu27-M 3 роки тому

    First Project always special