8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 319dbb1 commit b8fda62Copy full SHA for b8fda62
ch08-conditional-logic/9b-challenge-simulate-an-election.py
@@ -37,7 +37,8 @@ def run_election(regional_chances):
37
# "B" is the total number of regions minus the number of regions won by
38
# candidate "A". The total number of regions is the same as the length
39
# of the regional_chances list.
40
- if num_regions_won_by_A > len(regional_chances) - num_regions_won_by_A:
+ num_regions_won_by_B = len(regional_chances) - num_regions_won_by_A
41
+ if num_regions_won_by_A > num_regions_won_by_B:
42
return "A"
43
else:
44
return "B"
0 commit comments