0

Where's hidden mistakes?

The tests number one & seven aren't complete: year = int(input()) if year%4==0: print("Leap year") else: if year%100==0: print("Leap year") else: if year%400==0: print("Leap year") else: print("Not a leap year")

12th Jul 2021, 7:45 PM
Vladimir Kushner
Vladimir Kushner - avatar
6 Answers
+ 1
1700,1800,1900 aren't leap years , basically years divided by 400 are leap years so Not all years that get divided by 100 are leap years.
12th Jul 2021, 9:28 PM
Abhay
Abhay - avatar
13th Jul 2021, 3:00 AM
David Ashton
David Ashton - avatar
0
It is divided, isn't it ? 100 is a multiple of 4
12th Jul 2021, 7:56 PM
Vladimir Kushner
Vladimir Kushner - avatar
0
То есть как бы выполнить проверку наоборот вопреки условию задания)
12th Jul 2021, 8:00 PM
Vladimir Kushner
Vladimir Kushner - avatar
0
Так все эти годы делятся без остатка ???
12th Jul 2021, 8:05 PM
Vladimir Kushner
Vladimir Kushner - avatar
0
Я не понимаю тогда в чем разница
12th Jul 2021, 8:05 PM
Vladimir Kushner
Vladimir Kushner - avatar