Refer to PyPoll_Challenge.py.
Create a text file of election results by Python to go through election_results.csv, and calculating the items below:
- Total Votes.
- County Votes.
- List of candidates who received votes.
- The total number of votes each candidate received.
- Percentage of votes each candidate won.
- The winner of the election based on popular vote.
Refer to election_results.txt
- The total amount of votes were 369,711.
- The largest county turnout is Denver with 82.8%.
- The winner of election is Diana DeGette with 73.8% (272,892) of all votes.
- Base on election results csv file, we can calculate which candidate was the most popular within a county.