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

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!