0
They are telling me that it's wrong please guys correct me , the answer should be" Not a leap year"
year = int(input()) if year/4: print ("Not a leap year") else: if year/100: print ("is a leap year") else: if year/400: print ("is a leap year") else: print("Not a leap year")
3 Answers
0
I didnât check your code but here is a correct one for a leap year
https://code.sololearn.com/c88738ApCgGI/?ref=app
0
Hi! why do you divide the value of a year by four? what is the sign of a leap year and how do I find out?
0
To determine divisibility, check if number a can be divided by number b without a remainder. Remainder can be calculated by modulo operator %
In code:
if a % b == 0