Question: python program please help Leap years are years with 366 days instead of 365 (february has 29 days instead of 28 during leap years). Write

python program please help python program please help Leap years are years with 366 days instead

Leap years are years with 366 days instead of 365 (february has 29 days instead of 28 during leap years). Write a function isLeapYear that returns true if the parameter is a leap year and false otherwise. How to know if a year is a leap year? Here is the rule: - A leap year occurs on all years divisible by four (e.g., 2016, 2020, 2024, and so on). - However, the exception to this rule is that years divisible by one hundred (e.g., 2100, 2200, 2300 , and so on) aren't leap years. - And the exception to this exception is that years divisible by four hundred (e.g., 2000, 2400, and so on) are leap years. Do not forget docstrings! Test your function with the below assertions: assert isLeapYear (1999)== False assert isLeapYear (2000)= True assert isLeapYear (2001)== False assert isLeapYear (2004)== True assert isLeapYear (2100)== False assert isLeapYear (2400)= True

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!