Question
2. Create a python program that checks if the input value is a leap year and is a century year (ending in 00) Define a
2. Create a python program that checks if the input value is a leap year and is a century year (ending in 00) Define a function called leap_check that takes a parameter called input_year and returns an int value 1 if its input_year ends in 00 and is a leap year 0 if input_year is not a leap year -1 if input_year is a leap year but does not end in 00 Define a function called main Ask the user for a year to be input Validate that the input value is a positive 4 digit number If it is a 4 digit number call the leap_check function and pass in the input value Display with a descriptive sentence as one of the following based on the return value (Hint: you will need an if statement to determine which line gets displayed) is a leap year and a century year is a leap year but not a century year is not a leap year if its not a 4 digit year Display a message "Invalid input" Your program should terminate after displaying the message if it reaches this branch Don't forget to call main() as the last line of your script. File to be submitted: .py file
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