mirror of
https://github.com/TheAlgorithms/Python.git
synced 2024-11-23 21:11:08 +00:00
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
3f47a1f5b9
commit
6777f1ebd3
|
@ -36,7 +36,9 @@ def logarithmic_series(x_value: float, n_terms: int = 5, expand: bool = False) -
|
|||
n_times_x_minus_1 *= x_value - 1
|
||||
else:
|
||||
sign: str = "-" if (-1) ** (n + 1) == -1 else ""
|
||||
term: str = sign + "(" + str(x_value - 1) + "^" + str(n) + ")" + "/" + str(n)
|
||||
term: str = (
|
||||
sign + "(" + str(x_value - 1) + "^" + str(n) + ")" + "/" + str(n)
|
||||
)
|
||||
if term.startswith("-(-"):
|
||||
term = "(" + term[3::]
|
||||
elif term.startswith("(-"):
|
||||
|
|
Loading…
Reference in New Issue
Block a user