Question: in python format, please double check indentations Task 2: Leap Year-or Not A year can be a leap year, a year when there are 29

in python format, please double check indentations
Task 2: Leap Year-or Not A year can be a leap year, a year when there are 29 days in February, if it's evenly divisible by 4 However, not all years divisible by 4 are leap years. If a year divisible by 4 is a century year, i.e. divisible by 100, then it must be divisible by 400 to be a leap year. Thus, 1700, 1800, and 1900, were not leap years, but 1600 and 2000 were. For this task, you're going to write two functions as follows: leap-year ): It takes a single integer argument, a year, and returns True if the year is a leap year and False if it isn't. Use the modulo function in your code to test for divisibility Forexample, to test whether a number num is evenly divisible by n, one can use a statement such as the following: if num % n: 0: print (num, 'is divisible by', n) There are a number of valid ways to code this problem (and most other ones as well). How- ever, you'll need to use three modulo statements. * main (): Prompts user for a year and prints the results of calling leap-year ) as shown in the examples below. Enter a year [4 digits]: 2016 2 2016 is a leap year! Enter a year [4 digits]: 2000 2 2000 is a leap year! i Enter a year [4 digits] 2019 2 2019 isn't a leap year. Enter a year [4 digits] 2200 2 2200 isn't a leap year
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
