- 2

Leap Year

year = int(input()) if year % 4 == 0: if year % 100 == 0: if year % 400 == 0: print("Leap year") else: print("Not a leap year") else: print("Leap year") else: print("Not a leap year") What in the world is ==0: ???

13th Nov 2021, 9:14 PM
sword saint
sword saint - avatar
4 Respostas
+ 6
sword saint , you have just registered at sololearn some days ago. and you have not started any of the tutorials. it needs to learn the basics of a programming language, do all the exercises and try to answer the questions in the tutorial. also practice as much as you can afford this will take some time, but there is no short, tricky, cool or easy way to get successful. so please be patient. happy coding and good success
16th Nov 2021, 12:05 PM
Lothar
Lothar - avatar
+ 2
Take a Python course and find out.
13th Nov 2021, 9:18 PM
Simon Sauter
Simon Sauter - avatar
+ 1
https://python-reference.readthedocs.io/en/latest/docs/operators/equal.html
14th Nov 2021, 12:15 AM
Hatsy Rei
Hatsy Rei - avatar
+ 1
Yeah, I kinda noticed that as well. I went back and reread the tutorials since I did skip some of it. Thank you very much for your input, sir.
16th Nov 2021, 5:03 PM
sword saint
sword saint - avatar