Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 929301c

Browse files
committedJun 12, 2024·
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent df400a7 commit 929301c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
 

‎maths/probability_of_n_heads_in_m_tossing.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,11 @@ def probability_of_n_heads_in_m_tossing(head_count: int, toss_count: int) -> int
6666
raise ValueError("Head count should be smaller than toss count")
6767

6868
value = np.ones(1)
69-
69+
7070
iter1 = 0
71-
while iter1 < toss_count :
71+
while iter1 < toss_count:
7272
value = np.append(value, [0], axis=0) + np.append([0], value, axis=0)
7373
value = value / 2
74-
iter1 = iter1 +1
74+
iter1 = iter1 + 1
7575

7676
return value[head_count]

0 commit comments

Comments
 (0)
Please sign in to comment.