नीचे दिए गए कोड का आउटपुट क्या है?
What is the output of below code?
print(3-2*2*3+99/11)
A)
B)
C)
D)
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