diff --git a/projects/Leap_Year_Checker/README.md b/projects/Leap_Year_Checker/README.md new file mode 100644 index 000000000..636aa2092 --- /dev/null +++ b/projects/Leap_Year_Checker/README.md @@ -0,0 +1,13 @@ +# Script Title + +With the help of this program, you can check whether a year is leap year or not. +### Prerequisites + +No pre-requisites are required...😀😀 +### How to run the script + +You can run this on any ide or online compiler. + +## *Author Name* + +[Hariom1509](https://github.com/Hariom1509) diff --git a/projects/Leap_Year_Checker/leapyear.py b/projects/Leap_Year_Checker/leapyear.py new file mode 100644 index 000000000..4b1fb3470 --- /dev/null +++ b/projects/Leap_Year_Checker/leapyear.py @@ -0,0 +1,12 @@ +year = int(input("Enter a year:- ")) # Here, you take the input from the user + +if(((year % 4 == 0) and (year % 100 != 0)) or (year % 400 == 0)): + """ + if a year is a multiple of four and a multiple of 100 i.e. if it is a multiple of 400 it is not a leap year + """ + print("{0} is a leap year!!".format(year)) + """ + printing the output + """ +else: + print("{0} is not a leap year!!".format(year))