HF RL Explorer

Task: Test Multiple Variables for Equality Against a Single Value

Task: Test Multiple Variables for Equality Against a Single Value: a task in Terminal-Lego-15k (Harbor dataset). In Python, the expression if x or y or z == 0: does not work as many beginners expect. This expression is evaluated as if (x) or (y) or (z == 0): , which means it checks if x is truthy…

The task

In Python, the expression `if x or y or z == 0:` does not work as many beginners expect. This expression is evaluated as `if (x) or (y) or (z == 0):`, which means it checks if `x` is truthy, OR if `y` is truthy, OR if `z` equals 0 - not whether any of the three variables equals 0.

Part of PrimeIntellect/Terminal-Lego-15k.