Skip to content

Commit 1c62bd1

Browse files
cclaussgithub-actions
and
github-actions
authored
Precision must be a nonnegative integer (TheAlgorithms#2013)
* Precision must be a nonnegative integer * fixup! Format Python code with psf/black push Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
1 parent e6fdcc9 commit 1c62bd1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

data_structures/linked_list/singly_linked_list.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ def __setitem__(self, index, data):
106106
raise IndexError("Index out of range.")
107107
current = current.next
108108
current.data = data
109-
109+
110110
def __len__(self):
111111
"""
112112
Return length of linked list i.e. number of nodes

maths/bailey_borwein_plouffe.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def bailey_borwein_plouffe(digit_position: int, precision: int = 1000) -> str:
3939
if (not isinstance(digit_position, int)) or (digit_position <= 0):
4040
raise ValueError("Digit position must be a positive integer")
4141
elif (not isinstance(precision, int)) or (precision < 0):
42-
raise ValueError("Please input a nonnegative integer for the precision")
42+
raise ValueError("Precision must be a nonnegative integer")
4343

4444
# compute an approximation of (16 ** (n - 1)) * pi whose fractional part is mostly accurate
4545
sum_result = (

0 commit comments

Comments
 (0)