Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chore: Fix failing tests
  • Loading branch information
CaedenPH committed Nov 2, 2022
commit 5f347e96516db8908c86746dc94a0462933114cb
8 changes: 6 additions & 2 deletions linear_algebra/src/polynom_for_points.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,13 @@ def points_to_polynomial(coordinates: list[list[int]]) -> str:
number of points you want to use

>>> print(points_to_polynomial([]))
The program cannot work out a fitting polynomial.
Traceback (most recent call last):
...
ValueError: The program cannot work out a fitting polynomial.
>>> print(points_to_polynomial([[]]))
The program cannot work out a fitting polynomial.
Traceback (most recent call last):
...
ValueError: The program cannot work out a fitting polynomial.
>>> print(points_to_polynomial([[1, 0], [2, 0], [3, 0]]))
f(x)=x^2*0.0+x^1*-0.0+x^0*0.0
>>> print(points_to_polynomial([[1, 1], [2, 1], [3, 1]]))
Expand Down
2 changes: 1 addition & 1 deletion matrix/cramers_rule_2x2.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def cramers_rule_2x2(equation1: list[int], equation2: list[int]) -> tuple[float,
determinant_y = [[a1, d1], [a2, d2]]

>>> cramers_rule_2x2([2, 3, 0], [5, 1, 0])
(0, 0)
(0.0, 0.0)
>>> cramers_rule_2x2([0, 4, 50], [2, 0, 26])
(13.0, 12.5)
>>> cramers_rule_2x2([11, 2, 30], [1, 0, 4])
Expand Down
8 changes: 4 additions & 4 deletions other/password.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,13 @@ def is_strong_password(password: str, min_length: int = 8) -> bool:
"""
>>> is_strong_password('Hwea7$2!')
True
>>> strong_password_detector('Sh0r1')
>>> is_strong_password('Sh0r1')
False
>>> strong_password_detector('Hello123')
>>> is_strong_password('Hello123')
False
>>> strong_password_detector('Hello1238udfhiaf038fajdvjjf!jaiuFhkqi1')
>>> is_strong_password('Hello1238udfhiaf038fajdvjjf!jaiuFhkqi1')
True
>>> strong_password_detector('0')
>>> is_strong_password('0')
False
"""

Expand Down