You have to add brackets. Currently you're comparing 0 != a.
Fix:
a = 5 b = -5 if (b > 0) != (a > 0): print("Hi") else: print("Bye")