Based on the fact that the program should be able to return true if the input is a leap year, and false if the input is not, the program is shown below.
In order to make a program that tells whether a year is a leap year or not, you need to start off with the definition:
def is_leap_year(user year):
Then continuing the program, the full code would be:
def is_leap_year(user_year):
if(user_year % 400 == 0):
return True
elif user_year % 100 == 0:
return False
elif user_year%4 == 0:
return True
else:
return False
if __name__ == '__main__':
user_year = int(input())
if is_leap_year(user_year):
print(user_year, "is a leap year.")
else:
print(user_year, "is not a leap year.")
If you input the year, 1712, the program would return the result, "1712 is a leap year."
Find out more on using programs to define functions at https://brainly.com/question/20476366
#SPJ1