Python Program to Check Leap Year (Hindi) | Python Tutorial

แชร์
ฝัง
  • เผยแพร่เมื่อ 13 ก.ค. 2022
  • In this video, learn Python Program to Check Leap Year (Hindi) | Python Tutorial. Find all the videos of the 100+ Python Programs Course in this playlist: • Python Program to Add ...
    💎 Get Access to Premium Videos and Live Streams: / @wscubetech
    WsCube Tech is a leading Web, Mobile App & Digital Marketing company, and institute in India.
    We help businesses of all sizes to build their online presence, grow their business, and reach new heights.
    👉For Digital Marketing services (Brand Building, SEO, SMO, PPC, SEM, Content Writing), Web Development and App Development solutions, visit our website: www.wscubetech...
    👉Want to learn new skills and improve existing ones with in-depth and practical sessions? Enroll in our advanced online courses now and make yourself job-ready: courses.wscube...
    All the courses are job-oriented, up-to-date with the latest algorithms and modules, fully practical, and provide you hands-on projects.
    👉 Want to learn and acquire skills in English? Visit WsCube Tech English channel: bit.ly/2M3oYOs
    📞 For more info about the courses, call us: +91-7878985501, +91-9269698122
    ✅ CONNECT WITH THE FOUNDER (Mr. Kushagra Bhatia) -
    👉 Instagram - / kushagrabhatiaofficial
    👉 LinkedIn - / kushagra-bhatia
    Connect with WsCube Tech on social media for the latest offers, promos, job vacancies, and much more:
    ► Subscribe: bit.ly/wscubech...
    ► Facebook: / wscubetech.india
    ► Twitter: / wscubetechindia
    ► Instagram: / wscubetechindia
    ► LinkedIn : / wscubetechindia
    ► TH-cam: / wscubetechjodhpur
    ► Website: wscubetech.com
    -------------------------------------| Thanks |--------------------------
    #pythontutorials #pythonprogramming #pythonprograms

ความคิดเห็น • 76

  • @wscubetech
    @wscubetech  2 ปีที่แล้ว +1

    😎Hey, thanks for watching! We’d love to know your thoughts/doubts here in the comments.
    👉For professional self-paced certification courses (pre-recorded), visit: bit.ly/Pre-Recorded-Course
    👉Don’t forget to SUBSCRIBE to our channel for more such videos & valuable content: bit.ly/TH-cam-WsCubeTech

  • @learningcoder
    @learningcoder ปีที่แล้ว +25

    Mam here is an easy and alternative program to calculate this:
    year = int(input("Enter year to check: "))
    if (year%4==0) and (year%400==0) :
    print("It is a leap year.")
    elif (year%4==0) and (year%100!=0):
    print("It is a leap year.")
    else:
    print("It is not a leap year.")

    • @darkminds35
      @darkminds35 10 หลายเดือนก่อน +1

      🎉

    • @BMWCLASSICS_
      @BMWCLASSICS_ 24 วันที่ผ่านมา

      so easy nice

  • @indrajitkumar2795
    @indrajitkumar2795 9 หลายเดือนก่อน +21

    Here's an easy way to do this
    year=int (input("Enter a year "))
    temp=year//100
    if temp%4==0:
    print (year,"is a leap year")
    else:
    print (year,"is not leap year")

    • @100msplays4
      @100msplays4 5 หลายเดือนก่อน +1

      This is also wrong. we need both 4 , 100 and 400 to check leap years.

    • @nxtjourney1827
      @nxtjourney1827 4 หลายเดือนก่อน +1

      ​@@100msplays4why we need

    • @nxtjourney1827
      @nxtjourney1827 4 หลายเดือนก่อน

      ​@@100msplays4why we need

    • @100msplays4
      @100msplays4 4 หลายเดือนก่อน

      @@nxtjourney1827 cauz not every year divisible by 4 is not leap year, u can check online, i think 1900 is one of them

  • @xyz-ub8qo
    @xyz-ub8qo 5 หลายเดือนก่อน +10

    Madam faltu me itne saare conditions lagaye. Agar / 4 == 0 karte. To hi condition satisfy ho jata

    • @Yoursarveshrajput
      @Yoursarveshrajput 3 หลายเดือนก่อน

      Yess brother 😂

    • @rockmode404
      @rockmode404 2 หลายเดือนก่อน +2

      use year 1900 to check if you are right or wrong

    • @rohaanali937
      @rohaanali937 2 หลายเดือนก่อน

      ​@@rockmode4041900%4 == 0 so isn't he right

    • @Jaimatrabhumi
      @Jaimatrabhumi หลายเดือนก่อน

      ​@@rockmode404satisfied ho jayega bhai (475)

    • @Jaimatrabhumi
      @Jaimatrabhumi หลายเดือนก่อน

      ​@@rockmode404satisfied ho jayega bhai (475)

  • @GoogleAndroidSmart
    @GoogleAndroidSmart 2 ปีที่แล้ว +6

    Success is the result of perfection,hard work, learning from failure,loyalty,and persistence ?

  • @factstime7582
    @factstime7582 8 หลายเดือนก่อน +1

    Mam it can be done with simple program than this. There is no need to write such conditions
    [n=int(input("enter any year = "))
    if n%4==0 :
    print (n," is a leap year")
    else:
    print(n," is not a leap year ")]

    • @100msplays4
      @100msplays4 5 หลายเดือนก่อน

      u dumb or wht not every year divisible by 4 is a leap year.

  • @shikhasolankistartforeverl1336
    @shikhasolankistartforeverl1336 2 ปีที่แล้ว +1

    Greatest videos it very helpful for bigners

    • @_devil_tm727
      @_devil_tm727 9 หลายเดือนก่อน

      ryght dedi😂

  • @GoldTechOfficial498
    @GoldTechOfficial498 4 หลายเดือนก่อน

    Thank you ma'am

  • @subhashchandra9690
    @subhashchandra9690 6 หลายเดือนก่อน

    Year = int(input("enter a year: ")
    If (year % 400 == 0) and (year % 100 == 0):
    print (year,"is a leap year")
    elif (year % 4 == 0) and (year % 100 != 0):
    print ( year,"is a leap year ")
    else ( print ,"is not a leap year")

  • @AayushSoni-17
    @AayushSoni-17 หลายเดือนก่อน

    Year = int(input("Enter the Year about which you want to know wheather it's a leap year or not: "))
    if Year%4 == 0:
    print("The year give by you is a leap year")
    else:
    print("The year give by you is not a leap year")
    is that true??

  • @RishiRajxtrim
    @RishiRajxtrim 10 หลายเดือนก่อน +2

    6:15
    No need to use "and (year % 100 == 0)" in line 3 of program code

    • @Dutifly07
      @Dutifly07 7 หลายเดือนก่อน

      print("" if (n:=int(input("Enter a year: "))) else "hi" ,f"{n} is leap year" if n%400==0 or n%4==0 and n%100 else f"{n} is not a leap year")

  • @ALEX_Edts
    @ALEX_Edts 12 วันที่ผ่านมา

    try this:
    a=int(input("enter year"))
    if(a%4==0 and (a%100!=0 or a%400==0)):
    print("its a leap year")
    else:
    print("noooo")

  • @Sathvikachava-hn9zf
    @Sathvikachava-hn9zf 16 วันที่ผ่านมา

    Import calendar
    Print(calendar.isleap(2020))
    O/p true

  • @soumyanandan1567
    @soumyanandan1567 5 หลายเดือนก่อน

    Here is an easy way to do this:
    Year=int(input("Enter the year"))
    if Year%4==0 and Year%100!=0 or Year%400==0:
    print("It is a leap year")
    else:
    print("It is not a leap year")

    • @Ihateanimalloverstheyareshit
      @Ihateanimalloverstheyareshit 5 หลายเดือนก่อน

      Bhai yeh leap year kya hota hai . Badi confusion hai . Python ka course kr rha hoon pr aadhe se zyada cheeze to h pta hi nahi kya hoti hai 😢

  • @_HARSH9797
    @_HARSH9797 6 หลายเดือนก่อน

    wow omg nice video

  • @kritikasharma8thb712
    @kritikasharma8thb712 8 หลายเดือนก่อน +4

    2006 is not a leap year ma'am

    • @vedbhensdadia
      @vedbhensdadia 7 หลายเดือนก่อน +1

      Yess 2006 is not leap year, Code is right 👍

  • @user-zz4wm2fc1l
    @user-zz4wm2fc1l 6 หลายเดือนก่อน +1

    Corrected Code👇👇
    year = int(input("Enter a year: "))
    if (year % 400 == 0) and (year % 4 == 0) or (year % 100 == 0):
    print(year,"is a leap year")

    else:
    print(year,"is not a leap year")

  • @muhammadusama6633
    @muhammadusama6633 2 ปีที่แล้ว +1

    great video

  • @velocxty2477
    @velocxty2477 ปีที่แล้ว

    Great explanation ma’am!👍

  • @bikibharali5240
    @bikibharali5240 หลายเดือนก่อน +1

    x = int(input("Enter the year: "))
    if x%400==0 or x%4==0:
    print(f"The year {x} is a Leapyear")
    else:
    print(f"The year {x} is not a Leapyear")

  • @ashifshaikh199
    @ashifshaikh199 ปีที่แล้ว +3

    year = int(input("enter a year:"))
    if (year % 4 == 0):
    print(year, "is a leap year")
    else:
    print(year, "is not a leap year")

    • @yogeshverma5620
      @yogeshverma5620 ปีที่แล้ว

      Is it work

    • @ashifshaikh199
      @ashifshaikh199 ปีที่แล้ว +1

      @@yogeshverma5620 yes you can check it

    • @AbdullahKhan-xo6fy
      @AbdullahKhan-xo6fy ปีที่แล้ว +2

      @@ashifshaikh199 i am confused why she divide year by 100 and 400.

    • @ashifshaikh199
      @ashifshaikh199 ปีที่แล้ว

      i was also confused thats why i comment@@AbdullahKhan-xo6fy

    • @sachinverma8628
      @sachinverma8628 ปีที่แล้ว +1

      @@AbdullahKhan-xo6fy she did that to check if a century is leap year or not like 1600 year is leap year but 1500 not that's why the 400 and 100 condition enters the chat

  • @satyanii7668
    @satyanii7668 5 หลายเดือนก่อน

    It is nice video.

  • @ravindarahirwar2343
    @ravindarahirwar2343 ปีที่แล้ว +1

    Good mem

  • @GalaxyCookies76
    @GalaxyCookies76 3 หลายเดือนก่อน

    Even Dr. Angela failed to explain this concept the way you have, in a simple and easy way.

  • @VANSHRAJOTIA
    @VANSHRAJOTIA ปีที่แล้ว +1

    a = int(input("Enter the year : "))
    b = a%4
    if(b==0):
    print(a, "is a leap year")
    else:
    print(a, "is not a leap year")

    • @sachinverma8628
      @sachinverma8628 11 หลายเดือนก่อน +1

      To bhai jo centuries 100 200 300 500.....1100,1300 1400, 1500 bhi leap year hi show hogi but ye to normal year h

    • @VANSHRAJOTIA
      @VANSHRAJOTIA 11 หลายเดือนก่อน

      ooh bhai thanks yaar main ye centuries pe to dhyan hi nhi diya tha 😁😁😁@@sachinverma8628

    • @bobbyrajgorai695
      @bobbyrajgorai695 11 หลายเดือนก่อน

      @@sachinverma8628 these years were leap.....yes 0th year was leap.....so the 4th.....and so the 100, 200, 300,....were leap years every 00 i.e. a century is leap only, amazing hus:) .......-ve years are the years before the calender starter i.e. 2023 years ago from this year so it wont be affected by this that those whice were -ve multiple were leap year only......as when we divide any no. (-ve/+ve) with is factor it will always give remainder 0 which doesnt determive any sign ......hope you found this useful nigga:)

  • @user-st4xy4fc5b
    @user-st4xy4fc5b 2 ปีที่แล้ว

    Hello maim mera question ye hai k humare phone mein do tarah ki ip show hoti hai aik to phone ki settings mein aur dosri agar google pe my ip likh k search karein to, to kon c ip pe koi bhi attack perform ho sakta hai, phone ki settings wali ya jo google pe my ip likh k search kartay hein plz reply

    • @samdavid4941
      @samdavid4941 2 ปีที่แล้ว +1

      Agar aap LAN me attack kar rahe ho to apni LAN ki IP use Karo (wlan0) , Jo ki jyadatar 193.168 se suru hoti hai. Lekin agar aap over internet use kar rahe ho to to public IP use karna

    • @user-st4xy4fc5b
      @user-st4xy4fc5b 2 ปีที่แล้ว +1

      Ok thank u

  • @Hamadkmehsud
    @Hamadkmehsud ปีที่แล้ว

    its simple if num = int(input("Enter a year: "))
    if num % 4 == 0:
    print(num," is a Leap year")
    else:
    print(num, " is not Leap year")

    • @sachinverma8628
      @sachinverma8628 ปีที่แล้ว +2

      Then what about centuries like 1500 1300 1400....... From this program it will be also shown as leap year but these are normal year

    • @darkminds35
      @darkminds35 10 หลายเดือนก่อน +1

      In this calculation 1000 is a leap year which is wrong bro
      This code is not right😊

  • @ihaveitinme638
    @ihaveitinme638 8 หลายเดือนก่อน

    years=int(input("Enter Last Year till you want to see is that leap year or not:"))
    for i in range(1999,years+1):
    if i%400==0 and i%100==0:
    print("Leap Year :",i)
    if i%4==0 and i%100!=0:
    print("Leap Year :",i)
    # else:
    # print("NOt Leap Year :",i)

  • @simpleguy098
    @simpleguy098 8 หลายเดือนก่อน

    Whats wrong in this method pls anybody explain
    Year = int(input('enter a year: ') )
    If(year % 4 == 0) :
    print(year, "is a leap year) else:
    print(year, " is not a leap year)

    • @safariyakm
      @safariyakm 8 หลายเดือนก่อน +1

      It have two conditions
      #1 The year must be perfectly divisible by 400
      #2 The year must be divisible by 4 but not by 100
      year=int(input("enter year:"))
      If (year%400==0 or (year%4==0 and year%100 !=0)):
      print(year," is a leap year ")
      else:
      print(year," is not a leap year")

    • @heevanrazdan4769
      @heevanrazdan4769 7 หลายเดือนก่อน

      ​@@safariyakmsir I have the same qst why this 400 and 100 thing? Can't we just go by checking if it's a multiple of 4 or not?

    • @safariyakm
      @safariyakm 7 หลายเดือนก่อน

      @@heevanrazdan4769it's actually a calender thing.A year evenly divisible by 4 is a leap year, unless evenly divisible by 100, unless evenly divisible by 400. This keeps the Gregorian calendar accurate to within a day every 3236 years

  • @rishiraj2548
    @rishiraj2548 ปีที่แล้ว +4

    Respected Teacher,
    Kindly have a look at the simplified program for leap year:
    year = int(input("Enter a year number to check for being leap or non leap: "))
    # handle invalid inputs like negative or zero year number, non-numeric strings input
    status = "non leap"
    if year%400 == 0:
    status = "leap"
    elif year%100 == 0:
    status = "non leap"
    elif year%4 == 0:
    status = "leap"
    print("The year",year, "is a",status,"year.")

    • @prajwalatkar9398
      @prajwalatkar9398 10 หลายเดือนก่อน +1

      why we divided by 100 ?

    • @RishiRajxtrim
      @RishiRajxtrim 10 หลายเดือนก่อน +1

      Out of 100 and 400, if the year number is divisible only by 100 and not by 400, it is not a leap year.
      Examples: 1900, 2500, 2600, 2700 not leap.
      2000, 2400, 2800 are leap.

    • @prajwalatkar9398
      @prajwalatkar9398 10 หลายเดือนก่อน +1

      @@RishiRajxtrim thank you

  • @RishiRajxtrim
    @RishiRajxtrim 10 หลายเดือนก่อน

    🙏💯

  • @kanchanthakur08835
    @kanchanthakur08835 ปีที่แล้ว

    Bhai error aa rhi hai

  • @alifff1111
    @alifff1111 2 ปีที่แล้ว

    🎯🎯🎯🎯🔥😁😂😂🎯🎯

  • @maniac3449
    @maniac3449 4 หลายเดือนก่อน

    Century wale? Century 100 years hoti hai, 1000 years ko millennium bolte hain