Skip to content
This repository has been archived by the owner on Oct 7, 2023. It is now read-only.

Check the leap year in python #993

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions EM9CoR/dvvqnm.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
is_leap_year = lambda year: (year % 4 == 0 and year % 100 != 0) or (year % 400 == 0)
# takes the input from user
year = int(input("Enter a year: "))
if is_leap_year(year): print(year, " is a leap year")
else: print(year, "is not a leap year.")