Write a program with function leap-year() which takes a year as its argument and checks whether this year is a leap year or not
Write a program with function leap-year() which takes a year as its argument and checks whether this year is a leap year or not and then displays an appropriate message on screen. The program should stop. when the user inputs a leap year that is divisible by 5. Check the Sample output of this program: Enter a year to check if it's a leap year: 1999 1999 is not a leap year. Enter a year to check if it's a leap year: 2016 2016 is a leap year. 2016 is not devisable by 5 Enter a year to check if it's a leap year: 2000 2000 is a leap year. 2000 is devisable by 5 The End
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Here is a Python code for the program def leapyearyear Returns True if the given year is a leap year False otherwise if year 4 0 and year 100 0 or yea...See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started