HackerRank- Write a Function in Python
Problem 6:
You are given the year, and you have to write a function to check if the year is leap or not.
- def is_leap(year):
-
- if (year % 4) == 0:
- if (year % 100) == 0:
- if (year % 400) == 0:
- return True
- else:
- return False
- else:
- return True
- else:
- return False
-
- return leap
-
- year = int(input())