We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Python
- Introduction
- Write a function
- Discussions
Write a function
Write a function
Sort by
recency
|
3054 Discussions
|
Please Login in order to post a comment
def is_leap(year):
def is_leap(y): if y%400==0: return True elif y%100==0: return False elif y%4==0: return True else: return False
year = int(input()) print(is_leap(year))
def is_leap(year): leap = False
year = int(input()) print(is_leap(year))
This is correct code and it can also pass the hidden test