1.

What is the output of this expression, 3*1**3?(a) 27(b) 9(c) 3(d) 1I had been asked this question by my college professor while I was bunking the class.My enquiry is from Basic Operators topic in section Variable Names, Operators, Data Types & Numeric Types of Python

Answer»

Correct option is (c) 3

To EXPLAIN: First this expression will SOLVE 1**3 because exponential has higher precedence than multiplication, so 1**3 = 1 and 3*1 = 3. Final ANSWER is 3.



Discussion

No Comment Found

Related InterviewSolutions