🚀 Hurry! Offer Ends In
00 Days
00 Hours
00 Mins
00 Secs
Enroll Now
X

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 of 2.
  • The exponentiation operator ** has higher precedence than the negative sign, so -3 is treated as (-3) and then squared.
  • Squaring -3 gives 9 because: (−3)×(−3)=9(-3) \times (-3) = 9

Output:

(D) 9

Latest Updates