नीचे दिए गए कोड का आउटपुट क्या है?
What is the output of below code?
print(3-2*2*3+99/11)
A
0.0
B
3
C
9
D
-3
Explanation
The expression is:
Step 1: Follow the order of operations (PEMDAS/BODMAS).
- Parentheses
- Exponents
- Multiplication and Division (from left to right)
- Addition and Subtraction (from left to right)
Step 2: Break down the expression.
-
First, handle the multiplication and division.
- 2 * 2 = 4
- 4 * 3 = 12
- 99 / 11 = 9
Now the expression becomes:
-
Now, perform the addition and subtraction from left to right:
- 3 - 12 = -9
- -9 + 9 = 0
Final result: 0
Correct Answer: A) 0.0