1/15


#1

how to code if function?


#2

can you rephrase your question?


#3

I guess the line-2 got error


#4

Hi @best_musou ,

You have ...

if x%2:

It should be ...

if x % 2 == 0:

That is because x is even if, and only if, the remainder from dividing it by 2 is 0.