8000 Fix variable name issue · NamLQ/python-basics-exercises@0881715 · GitHub
[go: up one dir, main page]

Skip to content
Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

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

Lines changed: 2 additions & 2 deletions
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)
0