Python Programming - Operators Questions with Answers teach how to perform operations on data effectively. These Python Operators Questions are important for Infosys, Wipro, and SSC exams testing logical and arithmetic concepts
Python Operators
Showing 10 of
26 questions
11. What is the output of 2 ** 3 ** 2?
64
512
36
12
Answer: Option B
Hints: Exponentiation has right-to-left associativity. So 2 ** 3 ** 2 is evaluated as 2 ** (3 ** 2) = 2 ** 9 = 512.
Answer: Option B
Hints: According to operator precedence, multiplication (*) has higher precedence than addition (+), so 3 * 2 is evaluated first, then + 1.