Write a function Leap Year | HackerRank Solution | Python | Easy | Introduction | Hindi
ฝัง
- เผยแพร่เมื่อ 5 ต.ค. 2024
- #simplesnipcode #simplesnipcoderahul #rahulgupta #pythonprograms #pythoncode #hackerrank #hackerranksolution #hackerranksolutions #function #leapyear
Hackerrank Solution: How to check leap year in Python | How do I solve the leap year function in Python for Hackerrank? | Write a function | HackerRank Python Solution.
An extra day is added to the calendar almost every four years as February 29, and the day is called a leap day. It corrects the calendar for the fact that our planet takes approximately 365.25 days to orbit the sun. A leap year contains a leap day.
In the Gregorian calendar, three conditions are used to identify leap years:
The year can be evenly divided by 4, is a leap year, unless:
The year can be evenly divided by 100, it is NOT a leap year, unless:
The year is also evenly divisible by 400. Then it is a leap year.
This means that in the Gregorian calendar, the years 2000 and 2400 are leap years, while 1800, 1900, 2100, 2200, 2300 and 2500 are NOT leap years. Source
Task
Given a year, determine whether it is a leap year. If it is a leap year, return the Boolean True, otherwise return False.
Note that the code stub provided reads from STDIN and passes arguments to the is_leap function. It is only necessary to complete the is_leap function.
Input Format
Read year, the year to test.
Constraints
1900 less= year less= 10^5
Output Format
The function must return a Boolean value (True/False). Output is handled by the provided code stub.
Sample Input 0
1990
Sample Output 0
False
Explanation 0
1990 is not a multiple of 4 hence it's not a leap year.
► HackerRank Problem Link :-
www.hackerrank...
► Source Code GitHub :-
github.com/rah...
► Source Code File :-
drive.google.c...
► HackerRank Python Playlist :- • HackerRank Python Solu...
► Python Programs Playlist :- • Python Coding Tutorial...
► Computer Networking Playlist :- • Computer Networking Pr...
Your Query:
Write a function | Hackerrank Python Solutions
Write a function | Python | HackerRank | Introduction
Python HackerRank Challenge #6 Python: Write a Function
Python Hackerrank Solutions | Write a Function Easy Problem
Print Function | Hackerrank Python Solutions
write a function hackerrank solution in python 3
write a function in python hackerrank solution
write a function hackerrank solution in python github
write a function in python hackerrank answers
write a function in python hackerrank and solution
Thank you for the simple explanation but in the place of OR operator I think we need to use AND ?
Yes you do
Beautiful explanation, dìn bangaya humara
Thanks and welcome
Ho sake toh sir SQL ki series banao , itna accha padhate ho hindi mein
sure
Hindi mein samjhaya , aapka dhanyawad
Most Welcome
@@SimpleSnipCode kripa karke batao , it mein data analyst kaise bane. Kaha aply kare. Humare pehchan ka koi nahi hai it mein . Kaise andar jae
Learn python pandas and maths.
And a simple job on the job portal
@@SimpleSnipCode python pandas toh kar liya hai sir. Wo sql bahut sata raha hai. Otherwise my softskills are very perfect. I can speak good English, u can say advanced level also. I have knowledge of everything under the sun , since i was an upsc aspirant. 5 yrs ka gap ho gaya hai ab , now searching for a job. I have joined scaler sir. Scaler academy
Thanks sir video or dalo aage ka
Yes