Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

python-challenge

Name: Andrea Wu

For User, please CD to PYTHON-CHALLENGE file before running the script.

PyBank Work flow: The relative path would be to run the script would be: PyBank/main.py

  1. Get the path to current directory in case user are have download the file to different folder
  2. Get the path to read the csv file
  3. Create lists to store data from csv file and calculation
  4. Open and read the csv file
  5. Store header and data to list Reference: Class activity - Census
  6. Count and calculate the total month and amount
  7. Define variable to store greatest value
  8. Use for loop to calculate the change by month and compare the change with the previous greatest value.
  9. Calculate the average change
  10. Store all the result into a list
  11. Get the path to create analysis text file
  12. Use for loop to print result to text file and terminal

PyPoll Work flow: The relative path would be to run the script would be: PyPoll/main.py

  1. Get the path to current directory in case user are have download the file to different folder
  2. Get the path to read the csv file
  3. Create lists to store data from csv file and calculation
  4. Open and read the csv file
  5. Store header and data to list
  6. Count total vote
  7. Create unique list based on no. of candidate Reference: https://www.digitalocean.com/community/tutorials/get-unique-values-from-a-list-in-python
  8. Assign winner variable
  9. Use for loop to count vote for each candidate and find out the winner
  10. Store all the result into a list
  11. Get the path to create analysis text file
  12. Use for loop to print result to text file and terminal

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages