print((-3)** 2) का आउटपुट क्या है?
What is the output of print((-3)** 2) ?
A)
B)
C)
D)
Explanation:
The correct answer is:
(D) 9
Explanation:
- In Python, the expression
(-3)**2
means that the negative number-3
is raised to the power of2
. - The exponentiation operator
**
has higher precedence than the negative sign, so-3
is treated as(-3)
and then squared. - Squaring
-3
gives9
because: (−3)×(−3)=9(-3) \times (-3) = 9
Output:
(D) 9