samedi 14 septembre 2019

Can Someone explain me, whats wrong with this python code? [on hold]

I am a beginner, in Python programming. I have decided to make a leap year calculator. But, I don't know what's wrong with it, it gives me a syntax error. I am using Python 3 by the way. Here's the code.


mee = ('''Check if a year is leap year or not with this calculator
               ''')
print (mee)

year = int(input("Enter a year")

if (year %  4) == 0 :
    print(year + "Is a leap year")

else:
    print( year + "isn't a leap year")




It gives me an error on " if (year % 100) == 0 : "

Aucun commentaire:

Enregistrer un commentaire