Answer:
Follows are the code to this question:
y = int(input("Enter a year: "))#input year value
if((y%4==0) and (y%100==0) or y%400==0):#defining if block for check leap year condition
print("Given year {0}, is a leap year".format(y))#print value
else:#else block
print("Given year {0}, is not a leap year".format(y))#print value
Output:
Enter a year: 1989
Given year 1989, is not a leap year
Explanation:
In the python code, the y variable uses the input method for input the value from the user-end. In the next step, if a conditional block is used, that's checks the leap-year condition. if the condition is true it will print leap year value with the message, otherwise, it will go to else block that prints not a leap year message.