Skip to content

Commit

Permalink
Update instructions.append.md
Browse files Browse the repository at this point in the history
Clarify that the built-in exponentiation operator ** is equivalent to pow() and therefore doesn't demonstrate an implementation of a square root algorithm, and also note that for the domain of this exercise there are available solutions using only positive integers.
  • Loading branch information
xanni authored Nov 4, 2024
1 parent da94511 commit f588f25
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions exercises/practice/square-root/.docs/instructions.append.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
## How this Exercise is Structured in Python


Python offers a wealth of mathematical functions in the form of the [math module][math-module] and built-ins such as [`pow()`][pow] and [`sum()`][sum].
Python offers a wealth of mathematical functions in the form of the [math module][math-module] and built-ins such as the exponentiation operator `**`, [`pow()`][pow] and [`sum()`][sum].
However, we'd like you to consider the challenge of solving this exercise without those built-ins or modules.

While there is a mathematical formula that will find the square root of _any_ number, we have gone the route of having only [natural numbers][nautral-number] (positive integers) as solutions.
While there is a mathematical formula that will find the square root of _any_ number, we have gone the route of having only [natural numbers][nautral-number] (positive integers) as solutions. It is possible to compute the square root of any natural number using only natural numbers in the computation.


[math-module]: https://docs.python.org/3/library/math.html
Expand Down

0 comments on commit f588f25

Please sign in to comment.