Computer Science, asked by YAMUNAM, 5 months ago

3. Check whether entered year is leap year or not.



‼️‼️write a python program‼️‼️​

Answers

Answered by ADVIK143
6

Answer:

year = int(input("Enter year to check: "))

if year % 400 == 0:

print("It's a leap year")

else:

print("It's not a leap year")

Hope it helps!!

Have a great day!!

Answered by jai696
3

\huge\red{\mid{\fbox{\tt{Using\: Python\: 3}}\mid}}

is_leap = lambda year: (((year % 4 == 0) and (year % 100 != 0)) or (year % 400 == 0))

if is_leap((year := int(input("year: ")))):

print("Leap year! :-D")

else:

print("Not a leap year. :'(")

\large\mathsf\color{lightgreen}useful?\: \color{white}\longrightarrow\: \color{orange}brainliest!

Similar questions