Skip to content

Ridssodagar/python-challenge-1

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

python-challenge

Module 3 Python Challenge

For this assignment I had to complete two Python challenges named "PyBank" and "PyPoll"

For the PyBank challenge I had to create a Python scipt that analyzed the financial records of a company. Provided was the budget_data.csv dataset that inlcude two columns named "Date" and "Profit/Losses".

The challenge was to create a Python script to analyze these records and calculate the:

  1. The total number of months included in the dataset
  2. The net total amount of "Profit/Losses" over the entire period
  3. The changes in "Profit/Losses" over the entire period, and then the average of those changes
  4. The greatest increase in profits (date and amount) over the entire period
  5. The greatest decrease in profits (date and amount) over the entire period

The final results looked like this:

financial_analysis

The final script prints to the terminal and exports the file as a text file into an "analysis" folder.

For the second challenge, PyPoll, I had to create a Python script that analyzed the election results of a small, rural town. I was given a dataset with three columns that included "Voter ID," "County", and "Candidate".

The challenge was to create a Python script to analyze the vote and calculate:

  1. The total number of votes cast
  2. A complete list of candidates who received votes
  3. The percentage of votes each candidate won
  4. The total number of votes each candidate won
  5. The winner of the election based on popular vote

The final results looked like this:

election_results

The final script also prints to the terminal and exports the file as a text file into a seperate "analysis" folder.

Both scripts also store the header rows into csv_header.

About

Module 3 Python Challenge

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 100.0%