Ask Question
8 October, 01:07

A leap year in the Gregorian calendar system is a year that's divisible by 4 but not by 100, unless it is also divisible by 400. For example, 1896, 1904, and 2000 were leap years but 1900 was not. Write a function that takes in a year as input and prints whether it's a leap year (or not). In the program, ask the user to input a year and then call the function to determine whether the input year is a leap year or not. Display the result to the user.

+3
Answers (1)
  1. 8 October, 03:49
    0
    def leap_year (year):

    return int (year) % 4 = = 0 and (int (year) % 100! = 0 or int (year) % 400 = = 0)
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “A leap year in the Gregorian calendar system is a year that's divisible by 4 but not by 100, unless it is also divisible by 400. For ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers