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
|
3025 Discussions
|
Please Login in order to post a comment
year= int(input()) if(year%4==0 and year%100!=0)or(year%400==0): print(year,"is a leap year") else: (year,"not a leap year") mine code is true but n the end there is a code which cant be erased so the submit code option is showing failure so did anybody have an idea?
def is_leap(year): leap = False
year = int(input()) print(is_leap(year))
def is_leap(year): leap = False
year = int(input())
def is_leap(year):
year = int(input()) print(is_leap(year))
def is_leap(year):
return (True if (((year%4 == 0) and (year%100 != 0)) or (year%400 == 0)) else False)