1.

Which one of the following has the highest precedence in the expression?(a) Exponential(b) Addition(c) Multiplication(d) ParenthesesI got this question in an interview for job.My doubt is from Basic Operators topic in chapter Variable Names, Operators, Data Types & Numeric Types of Python

Answer»

The correct answer is (d) Parentheses

For EXPLANATION: Just REMEMBER: PEMDAS, that is, Parenthesis, Exponentiation, Division, Multiplication, Addition, Subtraction. NOTE that the precedence order of Division and Multiplication is the same. LIKEWISE, the order of Addition and Subtraction is also the same.



Discussion

No Comment Found

Related InterviewSolutions