Python में print(9//4*3 - 6*3//4) का आउटपुट क्या होगा?
What will be the output of print(9//4*3 - 6*3//4) in Python?
A
0
B
2
C
4
D
-2
Explanation
🔹 Expression:
print(9 // 4 * 3 - 6 * 3 // 4)
Python में operator precedence के अनुसार:
-
//(floor division) और*पहले होते हैं (left to right), -
फिर
-(subtraction)🔹 Step-by-Step Evaluation:
-
9 // 4 = 2 -
2 * 3 = 6 -
6 * 3 = 18 -
18 // 4 = 4 -
अब expression बन गया:
6 - 4 = 2
✅ Final Output: 2
-
Correct Answer: B) 2