diff --git a/leap year checker.py b/leap year checker.py index 86f0845..bffe4f9 100644 --- a/leap year checker.py +++ b/leap year checker.py @@ -1,13 +1,25 @@ def is_leap_year(year): - if year % 4 == 0: + if year % 4 == 0 : if year % 100 == 0: if year % 400 == 0: - print('Leap Year' ) + print('Leap Year') else: - print('Not leap year') + print('Not Leap Year') else: - print('Leap year' ) + print('Leap Year') else: print('Not Leap Year') -is_leap_year(2051) + +input_year = int(input('Input Year : ')) #made user input year +is_leap_year(input_year) + +#code to replay again +while True: + input_text = input('Still Wanna Input Year? (y/n) ') + if input_text == 'Y' or input_text == 'y': + input_year1 = int(input('Input Year : ')) + is_leap_year(input_year1) + else: + quit() +