mirror of
https://github.com/TheAlgorithms/Python.git
synced 2026-03-13 09:50:19 +08:00
Tighten up psf/black and flake8 (#2024)
* Tighten up psf/black and flake8
* Fix some tests
* Fix some E741
* Fix some E741
* updating DIRECTORY.md
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
This commit is contained in:
@@ -24,10 +24,10 @@ def square_root_iterative(
|
||||
"""
|
||||
Square root is aproximated using Newtons method.
|
||||
https://en.wikipedia.org/wiki/Newton%27s_method
|
||||
|
||||
|
||||
>>> all(abs(square_root_iterative(i)-math.sqrt(i)) <= .00000000000001 for i in range(0, 500))
|
||||
True
|
||||
|
||||
|
||||
>>> square_root_iterative(-1)
|
||||
Traceback (most recent call last):
|
||||
...
|
||||
|
||||
Reference in New Issue
Block a user