Python Programming MCQ - Variables And Operators

9. Arrange this in order of Precedence.

1. Exponentiation
2. Parentheses
3. Multiplication and Division
4. Addition and Subtraction

A. 1,2,3,4
B. 2,1,3,4
C. 1,2,4,3
D. 2,3,4,1

View Answer

10. Which of this statment will give an error?

A. a++
B. ++a
C. a+=1
D. Both A and B

View Answer

11. Which operator is used to calculate power of x raise to y.

A. x^y
B. x*y
C. x**y
D. None of the above

View Answer

12. Operators with the same precedence are evaluated from?

A. Left to Right
B. Right to Left
C. Depends on Compiler
D. None of the above

View Answer

13. "in" is a operator in python?

A. True
B. False

View Answer

14. What will be the output of statment 2**2**2**2

A. 16
B. 256
C. 32768
D. 65536

View Answer

15. What will be the output of the following code

 a = 1
 b = ++a
 print(b is a)

A. True
B. False
C. Error
D. None of these

View Answer

Also check :


* You must be logged in to add comment.