Total vote count or win 2 of 3 regions?
jmchamber58 opened this issue · 1 comments
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.
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.