Computer Science, asked by mark578, 11 months ago

write a python program to find weather entered year is leap or not answer if you are confident of your answer otherwise please don't give spam...........


BrainlyGod: if its divisible by 4 then

Answers

Answered by AmartyaChowdhury
1

Answer:

year = int(input("Enter any year : "))

if year%4 == 0:

print("The given year is a leap year.")

elif year%4 != 0:

print("Given year is not a leap year.")

else:

print("UNKNOWN USER INPUT!!!")

Answered by yp1232
2

Answer:

# To find weather the year is leap or not.

a=1

while a==1:

  year = int(input("Enter the year: "))

  if (year % 4) == 0:

     if (year % 100) == 0:

        if (year % 400) == 0:

           print(year,"is a leap year.")

        else:

           print(year,"is not a leap year.")

     else:

        print(year,"is a leap year.")

  else:

     print(year,"is not a leap year.")

  input(">PRESS ENTER TO SEARCH AGAIN.")

 

Similar questions