Skip to content

Using the concepts you've learned to complete two Python challenges, PyBank and PyPoll

Notifications You must be signed in to change notification settings

EpiKK30/python-challenge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

python-challenge

Repository Name: python-challenge

Description: The Python Challenge repository contains solutions to two ('Module 3 Challenge') Python challenges: PyBank and PyPoll. Both challenges simulate real-world scenarios where Python scripting skills are crucial for data analysis and automation tasks.

Project Structure:

  • PyBank:

    • main.py: Python script for analyzing financial data.
    • Resources: Folder containing the financial dataset (budget_data.csv).
    • Analysis: Folder containing the analysis results text file (budget_analysis.txt).
  • PyPoll:

    • main.py: Python script for analyzing poll data.
    • Resources: Folder containing the poll dataset (election_data.csv).
    • Analysis: Folder containing the analysis results text file (election_analysis.txt).

Instructions: Before running the scripts, follow these steps:

  1. Clone Repository: Clone this repository to your local machine using git clone.
  2. Navigate to Repository: Open your terminal and navigate to the cloned repository directory.
  3. Run Scripts: Run each script separately by executing python main.py within the respective project directories (PyBank and PyPoll).
  4. Verify Results: Check the analysis results in the corresponding Analysis folders.

Project Overview:

  • PyBank:

    • Analyzes financial data to calculate total months, net total profit/loss, average change, and identifies the greatest increase and decrease in profits.
    • Utilizes Python's csv module for reading CSV files and handles data using variables, lists, and dictionaries.
  • PyPoll:

    • Modernizes a small, rural town's vote-counting process by analyzing poll data.
    • Calculates total votes cast, lists of candidates who received votes, percentages of votes each candidate won, and determines the winner of the election based on popular vote.
    • Utilizes Python's file handling capabilities and data structures like lists and dictionaries.

Considerations:

  • Use the csv module to handle CSV files effectively.
  • Employ variables, lists, and dictionaries to store and manipulate data.
  • Break down tasks into smaller objectives for efficient problem-solving.
  • Debug code as needed to identify and fix errors.
  • Ensure correct file paths for loading datasets and outputting analysis results.

Backup and Version Control:

  • Regularly commit your work to maintain version history and back it up by pushing changes to GitHub.

Additional Notes:

  • Each script operates independently, analyzing its respective dataset.
  • Remember to review the README.md file within each project folder for specific instructions and details.

Code Source: The Python script development process heavily utilized the Xpert Learning Assistant platform, leveraging its vast knowledge base and interactive capabilities. Additionally, some cross-comparisons were made with ' ChatGPT to address specific challenges encountered during script development.

Contact Information: If you have any questions, suggestions, or encounter issues, feel free to reach out to me via email at ngalakevin@gmail.com.

Thank you for exploring my Python Challenge repository!

About

Using the concepts you've learned to complete two Python challenges, PyBank and PyPoll

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages