From e9a2fd4a264c70cd016a68ad83673376a07b52f7 Mon Sep 17 00:00:00 2001 From: Phil Bajsicki Date: Sat, 20 Apr 2024 15:26:56 +0200 Subject: [PATCH] Removed unnecessary variable --- README.org | 1 - pydiceprob.py | 1 - 2 files changed, 2 deletions(-) diff --git a/README.org b/README.org index 228b9a2..4c3aa4a 100644 --- a/README.org +++ b/README.org @@ -190,7 +190,6 @@ For each throw, the probability of winning is the same. def multi_turn_single(k): p_win = 1 / k # Winning probability on any given throw p_lose = (k-1) / k # Losing probability on any given throw - bob_wins_prob_sum = 0 r = p_lose**2 probability_win = p_win / (1 - r) return probability_win diff --git a/pydiceprob.py b/pydiceprob.py index e6369cd..710a764 100644 --- a/pydiceprob.py +++ b/pydiceprob.py @@ -74,7 +74,6 @@ def one_turn_single(k): def multi_turn_single(k): p_win = 1 / k # Winning probability on any given throw p_lose = (k-1) / k # Losing probability on any given throw - bob_wins_prob_sum = 0 r = p_lose**2 probability_win = p_win / (1 - r) return probability_win