Skip to content

Commit

Permalink
Update instructions.append.md (#3812)
Browse files Browse the repository at this point in the history
* Update instructions.append.md

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.

* Update exercises/practice/square-root/.docs/instructions.append.md

Adhere to one sentence per line convention.

Co-authored-by: BethanyG <[email protected]>

---------

Co-authored-by: BethanyG <[email protected]>
  • Loading branch information
xanni and BethanyG authored Nov 4, 2024
1 parent da94511 commit e8b7192
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 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,11 @@
## 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 e8b7192

Please sign in to comment.