cs/Practical File/question_08.py
Neil Revin cc8b0efe94
feat: add practical file projects
Signed-off-by: Neil <neil@willofsteel.me>
2025-06-24 02:28:22 +05:30

12 lines
337 B
Python

# Question: Write a Python program to check whether a given year is a leap year or not.
def main(year: int) -> None:
if (year % 4 == 0 and year % 100 != 0) or (year % 400 == 0):
print(f"{year} is a leap year.")
else:
print(f"{year} is not a leap year.")
if __name__ == '__main__':
main(2020)
main(2021)