- 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: ???
4 Réponses
+ 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
+ 2
Take a Python course and find out.
+ 1
https://python-reference.readthedocs.io/en/latest/docs/operators/equal.html
+ 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.