You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In reading the exercise, the winner has to win 2 of 3 regions. This code seems to count wins as total vote counts across all regions. So the exercise was to do an electoral college kind of win, but your solution is counting the popular vote. Am I misinterpreting your code? Thanks, love the book and the exercises.
The text was updated successfully, but these errors were encountered:
Hey @jmchamber58! What was meant by the note "Assume that a candidate wins the election if they win at least two of the three regions" is that there is no additional weight or anything on the regions themselves. That is, the votes in one region don't count for more than the votes in another region.
The code is correct. It is not tallying the total number of votes for a candidate. Instead, it is tallying the number of reagions won by each candidate. The variable naming might be a bit confusing in this case. I'll see if I can improve that to make the solution easier to understand.
In reading the exercise, the winner has to win 2 of 3 regions. This code seems to count wins as total vote counts across all regions. So the exercise was to do an electoral college kind of win, but your solution is counting the popular vote. Am I misinterpreting your code? Thanks, love the book and the exercises.
The text was updated successfully, but these errors were encountered: