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
😎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
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.")
🎉
so easy nice
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")
This is also wrong. we need both 4 , 100 and 400 to check leap years.
@@100msplays4why we need
@@100msplays4why we need
@@nxtjourney1827 cauz not every year divisible by 4 is not leap year, u can check online, i think 1900 is one of them
Madam faltu me itne saare conditions lagaye. Agar / 4 == 0 karte. To hi condition satisfy ho jata
Yess brother 😂
use year 1900 to check if you are right or wrong
@@rockmode4041900%4 == 0 so isn't he right
@@rockmode404satisfied ho jayega bhai (475)
@@rockmode404satisfied ho jayega bhai (475)
Success is the result of perfection,hard work, learning from failure,loyalty,and persistence ?
Absolutely right 👍👍
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 ")]
u dumb or wht not every year divisible by 4 is a leap year.
Greatest videos it very helpful for bigners
ryght dedi😂
Thank you ma'am
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")
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??
6:15
No need to use "and (year % 100 == 0)" in line 3 of program code
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")
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")
Import calendar
Print(calendar.isleap(2020))
O/p true
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")
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 😢
wow omg nice video
2006 is not a leap year ma'am
Yess 2006 is not leap year, Code is right 👍
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")
great video
Great explanation ma’am!👍
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")
year = int(input("enter a year:"))
if (year % 4 == 0):
print(year, "is a leap year")
else:
print(year, "is not a leap year")
Is it work
@@yogeshverma5620 yes you can check it
@@ashifshaikh199 i am confused why she divide year by 100 and 400.
i was also confused thats why i comment@@AbdullahKhan-xo6fy
@@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
It is nice video.
Good mem
Even Dr. Angela failed to explain this concept the way you have, in a simple and easy way.
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")
To bhai jo centuries 100 200 300 500.....1100,1300 1400, 1500 bhi leap year hi show hogi but ye to normal year h
ooh bhai thanks yaar main ye centuries pe to dhyan hi nhi diya tha 😁😁😁@@sachinverma8628
@@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:)
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
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
Ok thank u
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")
Then what about centuries like 1500 1300 1400....... From this program it will be also shown as leap year but these are normal year
In this calculation 1000 is a leap year which is wrong bro
This code is not right😊
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)
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)
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")
@@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?
@@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
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.")
why we divided by 100 ?
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.
@@RishiRajxtrim thank you
🙏💯
Bhai error aa rhi hai
hey what kind of error are you facing??
🎯🎯🎯🎯🔥😁😂😂🎯🎯
Century wale? Century 100 years hoti hai, 1000 years ko millennium bolte hain