3 - how do I create a calendar in python? (Python tutorial for absolute beginners 2019)

Поделиться
HTML-код
  • Опубликовано: 27 ноя 2024

Комментарии • 106

  • @avrumy
    @avrumy 5 лет назад +41

    import calendar
    from datetime import datetime
    print([calendar.monthcalendar(datetime.now().year, month) for month in range(1, 13)])

    • @singularity1130
      @singularity1130 5 лет назад +1

      So few likes for such a clean and practical answer.

    • @avrumy
      @avrumy 5 лет назад +3

      @@singularity1130 thanks

    • @jippyjlock477
      @jippyjlock477 3 года назад

      A single tear drips down my cheek.

  • @its_da_norsee
    @its_da_norsee 3 года назад +6

    7:10 the answer is print( calendar.monthcalendar([year], [month], [width])
    E.G: print(calendar.monthcalendar(2021, 4, 3) prints April 2021 with the weekdays width as mon, tue, wed. Hope it helps

  • @jadude378
    @jadude378 5 лет назад +20

    20:10 so the way leap years work is every 4 years, unless the year is divisible by 100, in that case, it's not a leap year, unless the year is divisible by 400 then it is. so basically from 2000 to 3000 the years that are skipped are:
    2100
    2200
    2300
    2500
    2600
    2700
    2900

    • @CleverProgrammer
      @CleverProgrammer  5 лет назад +2

      I blame Trump. lol
      Also thanks for taking the time to look that up! That’s fascinating. Keep filling in my gaps of knowledge! lol
      - Aaron

    • @veggiet2009
      @veggiet2009 5 лет назад

      @@CleverProgrammer Lol, there's a great math-comedian named "Matt Parker" that has a great video explaining the different rules about leap years, it's definitely worth looking it up.

  • @CleverProgrammer
    @CleverProgrammer  5 лет назад +28

    "Camera guy coming in clutch" 😂 - Qazi

    • @CleverProgrammer
      @CleverProgrammer  5 лет назад +1

      Thank you Frankie. - Aaron

    • @RenatoBigCigar
      @RenatoBigCigar 5 лет назад +1

      @@CleverProgrammer Hello, about some stuff that improve the calendar module, you can' try something like a CSS interaction with, HTML and XML outputs ... like a todo event .. :-)

    • @maxkhan5044
      @maxkhan5044 4 года назад

      Are you Õzbek(Uzbek)

  • @MR-sq7iu
    @MR-sq7iu 5 лет назад +4

    11:31 Year Matrix
    def year_matrix(y, m = 13):
    for i in range(1, m):
    print(calendar.monthcalendar(y, i))
    year_matrix(2019)

  • @irlandeandocomorenao9717
    @irlandeandocomorenao9717 4 года назад +5

    print(calendar.month (2020, 12, 4))
    That's what I used to show 3 letters. It resizes the calendar, so the number 4 is for size, if you put 10 instead 4 for example, it shows the entire name of the week days.

  • @nemanjamarkovic9818
    @nemanjamarkovic9818 4 года назад +2

    add w-3 to show Mon, Tue , Wen, Thu, Fri, Sat, Sun :) Hope it helps. BTW awesome tutorial

  • @Sriram-ey3zb
    @Sriram-ey3zb 5 лет назад +6

    Oh yeah Clever Programmer wingman is back!!

    • @CleverProgrammer
      @CleverProgrammer  5 лет назад +1

      I like to call myself Robin.
      .....With baggage
      lol
      - Aaron

    • @Sriram-ey3zb
      @Sriram-ey3zb 5 лет назад +1

      @@CleverProgrammer 😂

  • @Sriram-ey3zb
    @Sriram-ey3zb 5 лет назад +6

    My goal is to become like you guys. Love you Qazi and Aaron 😎😋

    • @CleverProgrammer
      @CleverProgrammer  5 лет назад +3

      You are already like us, Leo. STAY COOL MAN. ❄️☃️
      - Aaron

    • @Sriram-ey3zb
      @Sriram-ey3zb 5 лет назад +1

      @@CleverProgrammer That means a lot Robin sir

  • @a-girl-has-no-name
    @a-girl-has-no-name 4 года назад +1

    Your videos are actually entertaining, I love those little random comments :3

  • @DarkStarRules
    @DarkStarRules 5 лет назад +5

    14:53 Every leap year there is one more day to February. Not a day less.

  • @Rhyto
    @Rhyto 5 лет назад +1

    Definitely stoked to finally have a grasp for this class module, however now I'm trying to understand how to make functions using "for" and "while loops to call for the user to input their own custom calendars.

    • @CleverProgrammer
      @CleverProgrammer  5 лет назад +1

      Keep going through our coding courses on RUclips! It'll click.

  • @niranjantuty
    @niranjantuty 5 лет назад +1

    Great Aaron is back !!

  • @poto_fun6713
    @poto_fun6713 3 года назад +1

    Amazing tutorial thanks all teacher.

  • @harshitagrawal5331
    @harshitagrawal5331 5 лет назад +3

    I love your channel.

  • @MuhammadAdilIbnWajidIbnIsmail
    @MuhammadAdilIbnWajidIbnIsmail 4 месяца назад

    6:18
    print(calendar.month(2024, 7, 3))

  • @SayemShahrier
    @SayemShahrier 5 лет назад +1

    Haha, Aaron takes over this channel, I love it he is hilarious! Thanks for the video man you can actually do something similar with Unix shell scripting displaying the calendar as well and excited about the Automation course. We want to see more of you!

    • @CleverProgrammer
      @CleverProgrammer  5 лет назад +1

      Yeah I’m taking over. Gotta take down the competition from the inside, you know?
      - Aaron, CEO of the Code Babes channel
      (joke)

    • @SayemShahrier
      @SayemShahrier 5 лет назад

      @@CleverProgrammer Haha! EPIC as always!

  • @Nallux
    @Nallux 5 лет назад +2

    Best channel!

  • @shashikanthp3145
    @shashikanthp3145 5 лет назад +17

    "How to automate stuff with python"
    Yes please!!!

    • @nikluz3807
      @nikluz3807 5 лет назад +1

      Shashikanth P automate the boring stuff with python..

  • @nitinmalik4120
    @nitinmalik4120 5 лет назад

    Wowwwwsome teaching. Leap year is every next 4th year. Year 2001 to 2100 has total 25 leap days.
    In Python we should give range in between 2001 to 2101. Ke. Gets 25

  • @DemzyTV
    @DemzyTV 5 лет назад

    To get rid of the annoying errors on that website use import os and then do os.system(“clear”) if you are on Linux, but if you have python installed on your computer and have windows you will do os.system(“cls”)
    Example:
    import os
    os.system(“clear”)
    print(“Hey!”)
    P.s you can also just do os.system(“clear||cls”)

    • @CleverProgrammer
      @CleverProgrammer  5 лет назад

      Oh 🙏🏻 thank you. You’re teaching ME now lol.
      - Aaron

    • @DemzyTV
      @DemzyTV 5 лет назад

      Clever Programmer lol

  • @strawberryyogurt0
    @strawberryyogurt0 5 лет назад +1

    It would have been better to simply keep the camera on python console.

  • @jassimalfonso
    @jassimalfonso 5 лет назад

    cool Stuff!

  • @majdmustafa2733
    @majdmustafa2733 3 года назад

    A Leap Year has 366 Days in a year not 364 and the month of February has one more day not one less. Short version is February 29 is on a leap year only.

  • @TheARCHITPATIL
    @TheARCHITPATIL 5 лет назад +1

    Hey I finished with your 1st video on your master class program but it didn't unlock 2nd video plz help

  • @fuquplz9983
    @fuquplz9983 4 года назад

    Damn this guy clever

  • @Runz1302
    @Runz1302 5 лет назад +1

    THIS MAN IS HILARIOUS LMFAO

  • @tanmoypal5358
    @tanmoypal5358 5 лет назад +1

    Sir, I love your channel, I learned so many things in python. I just want to get an idea how to create a chatbot, because, it is necessary for my final year project.

    • @CleverProgrammer
      @CleverProgrammer  5 лет назад

      Thanks! I’m glad you’re getting value. As for the chatbot, I’ll look into it!
      - Aaron

  • @itzipocalyspe9396
    @itzipocalyspe9396 3 года назад

    Leap years occur every 4 years except every 100 years except every 400 years. So the year 2000 is a leap year but 1900 and 2100 aren’t leap years. Lol this was a programming challenge I had in my Python course.

  • @margauxgrunenwald2303
    @margauxgrunenwald2303 2 года назад +1

    Hello!
    I’m looking to create a function to create a schedule for a training course based on some parameters (format, start date, etc) Like basically only put the start date and the end date would be given taking bank holidays weekdays etc into account. Has anyone worked on this ?

  • @marinakim2929
    @marinakim2929 4 года назад +1

    ahah.. so funny you are guys =)

  • @avinashbasetty
    @avinashbasetty 5 лет назад +1

    at 8:04, I was thinking about how come four zeroes appear in the first list of the matrix. later you cleared it Aaron :p

  • @domingo2977
    @domingo2977 4 года назад

    How do I get my screen to look like this? How do you decorate it with interactive HD graphics that change with every time you access it or click something & make it accessible between phones and computers???

  • @kekw9958
    @kekw9958 2 года назад

    One question, why are you running all the code everytime? Can we just run the new code that we want?

  • @QuickThrills1337
    @QuickThrills1337 4 года назад +2

    Traceback (most recent call last):
    File "main.py", line 1, in
    import calender
    ModuleNotFoundError: No module named 'calender'

    • @vishnujoshi2461
      @vishnujoshi2461 4 года назад

      The module calendar is not installed in your system. You can try 'pip install calendar' or python3 -m pip install calendar. If your pip doesn't work, there are various videos on how to install pip

    • @janmejayysharma4525
      @janmejayysharma4525 3 года назад

      its calendar not calender

  • @sbagchi26
    @sbagchi26 5 лет назад

    Please sir, make a simple video on console based chat-bot for beginners from where we can get a clear idea on chat-bot from scratch

    • @CleverProgrammer
      @CleverProgrammer  5 лет назад

      It’s on the idea list! Thanks for the video idea!
      - Aaron

  • @dustedangelo
    @dustedangelo 4 года назад +1

    10:15, I’m watching this on Feb. 27 :0

  • @한진영-o5q
    @한진영-o5q 2 года назад

    I like your hair and Thank you.

  • @modguy9894
    @modguy9894 5 лет назад +1

    Why do I have a feeling I'm listening to Lil pump while trying to learn something lol

    • @CleverProgrammer
      @CleverProgrammer  5 лет назад +1

      GUCCI GRANDPA GLASSES GANG
      - Aaron

    • @modguy9894
      @modguy9894 5 лет назад

      Online platform is the best these days because people like you crack jokes in between and makes it fun. Thank you all for your valuable time❤️

  • @fl6257
    @fl6257 5 лет назад

    Quazi sir
    Increase the size in the editors setting from view tab plzz i am watching on mobile

    • @CleverProgrammer
      @CleverProgrammer  5 лет назад +1

      I will! Sorry! Still learning.
      - Aaron

    • @fl6257
      @fl6257 5 лет назад

      You can do that in pycharm increase font size .

    • @fl6257
      @fl6257 5 лет назад

      I have an idea make a tutorial that no one had ever made on youtube like show as how to make login page using technology like python django,html,css,javascript,bootstraps. This video will provide tone of value to as . I hope you will think about this.
      -MR.k

  • @tommyza
    @tommyza 5 лет назад +1

    Hi there, great vid!
    a question for ya - in my country the week starts on sunday - how can i fix that in my code?

    • @LunarMartin
      @LunarMartin 3 года назад

      Just use your *IMAGINATION*

  • @frenzy9741
    @frenzy9741 5 лет назад

    Quick DUMBO question: Is it possible to have reptl as offline? I mean, there's Pycharm, VSCode, Atom, The text editor (like the one in Gnome), this other editor I can't remember, etc. Still, I just want to know, for the gimmick, because why not, if I can run reptl offline.

  • @ganeshkumar-nx1sd
    @ganeshkumar-nx1sd 5 лет назад

    How to open this Python compiler

  • @akriteepathak5779
    @akriteepathak5779 4 года назад

    I use PyCharm to write code
    but I don't know how to write code for calendar there

  • @marinakim2929
    @marinakim2929 4 года назад

    i did it! w=3 uuu how genius am i ahaha

  • @janvi2688
    @janvi2688 5 лет назад

    6:14 The 3rd variable was date 😁

  • @Alex-ws9lr
    @Alex-ws9lr 5 лет назад

    Calender

    • @CleverProgrammer
      @CleverProgrammer  5 лет назад

      Are you making fun of my spelling.
      Or did I just make fun of ours... lol
      - Aaron

    • @Alex-ws9lr
      @Alex-ws9lr 5 лет назад

      @@CleverProgrammer nah man just thought it was funny, great video!

  • @Jafx3
    @Jafx3 4 года назад

    Your concern is hair rather than code ... Lookin' for another teacher!

  • @DarkStarRules
    @DarkStarRules 5 лет назад

    Not trying to hate, but you guys need scripts.
    I think it would improve your videos.
    (Though I can't be talking since I don't use any for mines but since this is a tutorial, I thought you might need a script)

    • @jadude378
      @jadude378 5 лет назад

      what do you mean? he's writing a script throughout the video.
      I'm sorry I had to

    • @DarkStarRules
      @DarkStarRules 5 лет назад

      @@jadude378 lol

    • @CleverProgrammer
      @CleverProgrammer  5 лет назад +1

      Thanks for the input! Maybe we’ll try that again. Or I could just get better at not sucking 🙃
      - Aaron

    • @DarkStarRules
      @DarkStarRules 5 лет назад

      @@CleverProgrammerYou don't have to re-record it. Just, when you make future videos, use scripts.

  •  4 года назад

    i'm not gay but why u so smart and handsome too ? thank you

  • @deependrakumarrout4172
    @deependrakumarrout4172 5 лет назад

    Where is qazi?? Aaron

    • @CleverProgrammer
      @CleverProgrammer  5 лет назад +1

      Probably swimming in a sea of kittens and trail mix
      - Aaron

  • @DemzyTV
    @DemzyTV 5 лет назад

    10:14 Rip

  • @johnmarshallyt
    @johnmarshallyt 5 лет назад

    Broooo is that a Billie Eilish merch you're wearing❤❤❤❤❤😍😍😍😍😍😍

  • @aayushmitra121
    @aayushmitra121 5 лет назад +1

    10:39 lol

  • @baton4692
    @baton4692 4 года назад +1

    Кто русский ❤️

  • @theaveragemegaguy
    @theaveragemegaguy 5 лет назад +3

    Awh come on how can a programmer not know how to spell calendar ahahahah

  • @relytheone853
    @relytheone853 2 года назад

    how come you put calendar an a calendar appears. This not programming. HaHaha