write a python program to display number of days in a month
Answers
Answered by
0
Answer:
Malayalam kalakaar Kalispell kaki
Answered by
0
Answer:
class Solution(object):
def numberOfDays(self, y, m):
leap = 0
if y% 400 == 0:
leap = 1
elif y % 100 == 0:
leap = 0
elif y% 4 == 0:
leap = 1
if m==2:
return 28 + leap
list = [1,3,5,7,8,10,12]
if m in list:
return 31
return 30
ob1 = Solution()
print(ob1.numberOfDays(2020, 2))
Input
2020
2
Output
29
Similar questions
Political Science,
3 months ago
Science,
3 months ago
Hindi,
8 months ago
Math,
8 months ago
Social Sciences,
1 year ago