0

Please help, what am I doing wrong?

year = int(input()) #your code goes here if year % 4 == 0: if year % 100 == 0: if year % 400 == 0: print("Leap year") else: print("Not a leap year") else: print("Not a leap year") else: print("Not a leap year")

30th Jul 2021, 9:08 AM
Michael Dhlamini
Michael Dhlamini - avatar
2 odpowiedzi
+ 1
if (year % 4) == 0: if (year % 100) == 0: if (year % 400) == 0: print("{0} is a leap year".format(year)) else: print("{0} is not a leap year".format(year)) else: print("{0} is a leap year".format(year)) else: print("{0} is not a leap year".format(year))
30th Jul 2021, 9:12 AM
Sâgærāvürï
Sâgærāvürï - avatar
- 1
Thank you, you were right.
30th Jul 2021, 9:16 AM
Michael Dhlamini
Michael Dhlamini - avatar