पायथन cmath.sqrt () विधि
उदाहरण
एक सम्मिश्र संख्या का वर्गमूल ज्ञात कीजिए:
#Import cmath Library
import cmath
#Return the square root of a
complex number
print (cmath.sqrt(2 + 3j))
print (cmath.sqrt(15))
परिभाषा और उपयोग
यह cmath.sqrt()
विधि किसी सम्मिश्र संख्या का वर्गमूल लौटाती है।
नोट: संख्या 0 से अधिक या उसके बराबर होनी चाहिए।
वाक्य - विन्यास
cmath.sqrt(x)
पैरामीटर मान
Parameter | Description |
---|---|
x | Required. A number to find the square root of. If the number is less than 0, it returns a ValueError. If the value is not a number, it returns a TypeError |
टेक्निकल डिटेल
प्रतिलाभ की मात्रा: | एक complex मान, एक सम्मिश्र संख्या के वर्गमूल का प्रतिनिधित्व करता है |
---|---|
पायथन संस्करण: | 1.5 |