Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started