Question #860

What is the output of the code snippet below?
print(-2 ** 2)

The ** operator takes precedence over the - operator. As such, Python will calculate 2 ** 2 first (making 4) before applying - to it. (mathcs.emory.edu/~valerie/courses/fall10/155/resources/op...)


Comment on Disqus:

Question difficulty: šŸ”µšŸ”µšŸ”µšŸ”µšŸ”µ


Similar questions: