you need to change it to:
x = x % 2
to actually update the variable in line 2.
Question
def odd(x):
x % 2
return x > 0
Why does my function return True for even numbers?
Solution
you need to change it to:
x = x % 2
to actually update the variable in line 2.
OTHER TIPS
It isn't working as expected because you are returning "is x greater than 0?" Try with x = -1 and you will see that this is false. The x % 2 part is not doing anything.
I would recommend taking an online course like udacity.com 's intro to computer science to get a better grasp of how basic programming works.