How can we calculate square root without using any built-in function in python?
There is already a function in module "math" of python called "sqrt()". But if I want to calculate the square of a number without using the "sqrt()", how can I do that? Is there any formula or any method for it?
You can for instance say; root = Number**2.
but why don't you want to use math.sqrt or one-half power? I see two main reasons to avoid that: when you need more precision than the rest significant digits that math.sqrt and one-half power provide, or you are working with large integers and you want an exact answer for the integer part of the square root.
I can only assume that this is a homework question, otherwise why would you not use the built in function of the language?
A quick search for "square root algorithm" gave "About 69,000,000 results (0.50 seconds) "