LearnPy Hub
← If…Else problems
Hard

Is This a Real Date?

Read day, month and year (one line). Print Valid or Invalid. Remember leap years: divisible by 4, except centuries, unless divisible by 400.

Input

Three integers on one line.

Output

Valid or Invalid.

Sample 1

Input
29 2 2024
Output
Valid

Sample 2

Input
29 2 2023
Output
Invalid
solution.py
Output appears here
Is This a Real Date? · Python practice problem · LearnPy Hub