✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.
The following function is supposed to return -1 when
x is negative, +1 when xis positive, or
0 if
xis zero. What, if anything, is wrong with the
function?
def plusMinusZero(x) : if x == 0 : return 0 elif x <= 0 : return -1 else x >= 0 : return 1