Week 3 Python
The Python Challenge was split into two high-level tasks: PyBank and PyPoll. The purpose of PyBank was to use Python script to complete the following tasks:
Generate a script that will print the following to the terminal and export to a .txt file:
-
The total number of months included in the dataset
-
The net total amount of "Profit/Losses" over the entire period
-
The average of the changes in "Profit/Losses" over the entire period
-
The greatest increase in profits (date and amount) over the entire period
-
The greatest decrease in losses (date and amount) over the entire period
As for PyPoll, generate a script that will print the following to the terminal and export to a .txt file:
-
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.