Answer:
def year_type(yr):
if yr%400 == 0:
print('year', yr, ':' , 'is a leap year')
elif yr%100 ==0:
print('year' , yr, ':' , 'is not a leap year')
elif yr%4 ==0:
print('year', yr, ':', 'is a leap year')
else:
print('year', yr, ':', 'is not a leap year')
year_type(int(input('Enter a year value :')))
Explanation:
The function year_type was defined and takes in one argument which is the year value.
It check if the year is a leap year or not by using the conditional of statement.
If year is divisible by 400 program prints a leap year
If year is divisible by 100 program prints not a leap year
If year is divisible by 4 ; program prints a leap year
Else; everything outside the stated conditions, program prints not a leap year.
The function is called and the argument is supplied by the user using the input method.