पायथन math.sqrt () विधि
उदाहरण
विभिन्न संख्याओं का वर्गमूल ज्ञात कीजिए:
# Import math Library
import math
# Return the square root of
different numbers
print (math.sqrt(9))
print (math.sqrt(25))
print
(math.sqrt(16))
परिभाषा और उपयोग
यह math.sqrt()
विधि किसी संख्या का वर्गमूल लौटाती है।
नोट: संख्या 0 से अधिक या उसके बराबर होनी चाहिए।
वाक्य - विन्यास
math.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 |
टेक्निकल डिटेल
प्रतिलाभ की मात्रा: | एक float मान, किसी संख्या के वर्गमूल का प्रतिनिधित्व करता है |
---|---|
पायथन संस्करण: | 1.4 |