1.

Which one of the following has the same precedence level?(a) Addition and Subtraction(b) Multiplication, Division and Addition(c) Multiplication, Division, Addition and Subtraction(d) Addition and MultiplicationI have been asked this question by my college professor while I was bunking the class.This interesting question is from Basic Operators topic in division Variable Names, Operators, Data Types & Numeric Types of Python

Answer»

The correct choice is (a) ADDITION and Subtraction

Easiest explanation - “Addition and Subtraction” are at the same precedence level. SIMILARLY, “Multiplication and DIVISION” are at the same precedence level. HOWEVER, Multiplication and Division operators are at a higher precedence level than Addition and Subtraction operators.



Discussion

No Comment Found

Related InterviewSolutions