SHARE
TWEET

Untitled

a guest Feb 14th, 2020 77 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. f = lambda m,y,d: m>12 or y>2020 or (m>=2 and y>=2020 and d>14)
  2. f1 = lambda m: m % 2 == 0
  3. f2 = lambda m: m == 2
  4. def  is_year_leap (year):
  5.     return True if (year % 4 == 0 and year % 100 != 0) or year % 400 == 0 else Fasle
  6. def date(d,m,y):
  7.     if f(m,y,d):
  8.         return False
  9.     elif is_year_leap (y) and f2(m):
  10.         return False if d>29 else True
  11.     elif f2(m):
  12.         return False if d>28 else True
  13.     elif f1(m):
  14.         return False if d>30 else True
  15.     return False if d>31 else True
  16. day = int(input())
  17. month = int(input())
  18. Year = int(input())
  19. date(day,month,Year)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top