Question: In this Challenge, you are tasked with helping a small, rural town modernize its vote-counting process. You will be given a set of poll

 In this Challenge, you are tasked with helping a small, rural town
modernize its vote-counting process. You will be given a set of poll  

In this Challenge, you are tasked with helping a small, rural town modernize its vote-counting process. You will be given a set of poll data called election_data.csv. The dataset is composed of three columns: "Voter ID", "County", and "Candidate". Your task is to create a Python script that analyzes the votes and calculates each of the following values: The total number of votes cast A complete list of candidates who received votes The percentage of votes each candidate won The total number of votes each candidate won The winner of the election based on popular vote Your analysis should align with the following results: Election Results Total Votes: 369711 Charles Casper Stockham: 23.049% (85213) Diana DeGette: 73.812% (272892) Raymon Anthony Doane: 3.139% (11606) Winner: Diana DeGette In addition, your final script should both print the analysis to the terminal and export a text file with the results.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

To solve this problem we can create a Python script using the csv module to read the data and perfor... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Algorithms Questions!