Identify the correct output of the following Python arithmetic expression:…
2023
Identify the correct output of the following Python arithmetic expression: 1+(2-3)*4**5//6
- A.
-171 / -171
- B.
172 / 172
- C.
-170 / -170
- D.
170 / 170
Attempted by 2266 students.
Show answer & explanation
Correct answer: C
Solution: Evaluate the expression 1+(2-3)*4**5//6 step by step.
(2-3) = -1.
4**5 = 1024 (exponentiation is done before multiplication/division).
-1 * 1024 = -1024.
Floor division: -1024 // 6 = -171 because floor division rounds down toward negative infinity for negative operands.
Finally: 1 + (-171) = -170.
Final answer: -170