dimanche 7 février 2016

Simple If program in Python syntax error

num = int(input("Enter a number: ")
if num%2 == 0:
    print("The number is even")

else:
    print("The number is odd")enter code here

I'm getting a syntax error on the if statement line, I have searched everywhere for a reason why that happens, but I just can't find it, help? I'm using Visual Studio 2015 as my IDE if that's any help.

Aucun commentaire:

Enregistrer un commentaire