Right-associative powers and negative floor division

A programmer writes the following line of Python code while testing how operators combine:


Python
result = 2 ** 3 ** 2 % 100 - 45 // -7


What value is stored in result? Give your answer as an integer.

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

More Arithmetic Operators and Expressions Questions: