Question-32: When you run below code, what would happen?
print(9*9/9*9)
- 0
- Get all Questions and Answer from here
- You need to have paid subscription to access all questions
- Thanks for considering Python Certification Material
Answer: D
Exp:
- Priority-1: + and – (Unary Operator)
- Priority-2 : ** (Exponential)
- Priority-3 : *, /, //, %
- Priority-4 : + and – (Binary Operator)
Since / and * has same precedence. Hence, it moves from left to right as below
You can access to full explanation to question and answer from this page.