Question: A year is a leap year if it is divisible by 4 but if it is a century year it must be divisible by 400
A year is a leap year if it is divisible by 4 but if it is a century year it must be divisible by 400 to be a leap year. (For example, 2000 was a leap year but 1900, though divisible by 4, was not.) Write a program in Python that allows a user to enter up to five values for years, one at a time and for each one displays whether it is a leap year or not before asking for another entry. The user should be able to enter a negative number for the year to terminate the program early, i.e., without entering five values.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
