Ask Question
10 September, 14:10

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.

+5
Answers (1)
  1. 10 September, 14:30
    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?
Find 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 and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers