# leap_year_calc.py # This program calculates whether a year is leap year. # by: Scott Gordon def main(): print("***** Welcome to The Leap Year Calculator *****\n") print("Enter a year in the (xxxx) format to check if it is a leap year.") year = int(input("Enter the year here: ")) def check_leap(year): if((year % 400 == 0) or (year % 100 != 0) and (year % 4 == 0)): return True else: return False print(check_leap(year)) if __name__ == "__main__": main()
Фото Малыш цирк на Бессмысленно
Оригинал: “https://dev.to/sagordondev/leap-year-calculator-341p”