LearnPy Hub
← If…Else problems
Hard

Days in a Month

Read a month (1–12) and a year, and print the number of days in that month, taking leap years into account.

Input

Two integers.

Output

28, 29, 30 or 31.

Sample 1

Input
2
2024
Output
29

Sample 2

Input
2
1900
Output
28
solution.py
Output appears here
Days in a Month · Python practice problem · LearnPy Hub