Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- f = lambda m,y,d: m>12 or y>2020 or (m>=2 and y>=2020 and d>14)
- f1 = lambda m: m % 2 == 0
- f2 = lambda m: m == 2
- def is_year_leap (year):
- return True if (year % 4 == 0 and year % 100 != 0) or year % 400 == 0 else Fasle
- def date(d,m,y):
- if f(m,y,d):
- return False
- elif is_year_leap (y) and f2(m):
- return False if d>29 else True
- elif f2(m):
- return False if d>28 else True
- elif f1(m):
- return False if d>30 else True
- return False if d>31 else True
- day = int(input())
- month = int(input())
- Year = int(input())
- date(day,month,Year)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement