Skip to content

Commit 0881715

Browse files
committed
Fix variable name issue
1 parent d73b863 commit 0881715

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ch08-conditional-logic/9b-challenge-simulate-an-election.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -55,5 +55,5 @@ def run_election(regional_chances):
5555
# Display the probabilities that candidate A or candidate B wins the
5656
# election. Note the probability that B wins can be calculated by
5757
# subtracting the probability that A wins from 1.
58-
print(f"Probability A wins: {num_times_A_wins / num_trials}")
59-
print(f"Probability B wins: {1 - (num_times_A_wins / num_trials)}")
58+
print(f"Probability A wins: {num_times_A_wins / NUM_TRIALS}")
59+
print(f"Probability B wins: {1 - (num_times_A_wins / NUM_TRIALS)}")

0 commit comments

Comments
 (0)