Advertisement
Guest User

Untitled

a guest
Nov 22nd, 2014
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.20 KB | None | 0 0
  1. arr = [31,28,31,30,31,30,31,31,30,31,30,31]
  2. m = int(input("Month is "))
  3. y = int(input("Year is "))
  4. if m == 2 and ((y % 4 == 0 and y % 100 != 100) or y % 400 == 0):
  5.     print("29")
  6. else:
  7. print(arr[m-1])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement