Skip to content

Latest commit

 

History

History
39 lines (26 loc) · 1.1 KB

README.md

File metadata and controls

39 lines (26 loc) · 1.1 KB

Python Project PyPoll

  • Helping a small, rural town modernize it's vote counting process.

Vote Counting

Overview

  • In this Project, I created a Python script for analyzing the votes of election result of PyPoll.

  • We have a dataset and the dataset is composed of three columns: Voter ID, County, and Candidate. Our task is to create a Python script that analyzes the votes and calculates each of the following:

    • 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,

    • Also, final script both print the analysis to the terminal and exporting a text file with the results,

  • Final analysis:

    Election Results
    -------------------------
    Total Votes: 3521001
    -------------------------
    Khan: 63.000% (2218231)
    Correy: 20.000% (704200)
    Li: 14.000% (492940)
    O'Tooley: 3.000% (105630)
    -------------------------
    Winner: Khan
    -------------------------