+ 2
Why -2**4 is not 16
output of -2 to the power 4 is -16 .why not giving positive value.
3 Answers
+ 19
(-2)**4
#See why?
""" You did : -(2**4)"""
+ 6
try using it (-2)**4
I think just because of operator precedence
+ 4
The negative sign is applied after the exponent. PEMDAS treats a negative as multiplication (since you are, in essence, multiplying by negative one)