Giter VIP home page Giter VIP logo

python-challenge's Introduction

Python Challenge Project

Overview

This repository contains Python scripts for analyzing financial records (PyBank) and election data (PyPoll). The scripts read CSV files, perform analyses, and produce results that are printed to the terminal and exported to text files.

Project Structure

  • PyBank/

    • main.py: Python script for financial analysis.
    • Resources/: Folder containing the CSV file (budget_data.csv).
    • analysis/: Folder containing the text file with financial analysis results.
  • PyPoll/

    • main.py: Python script for election analysis.
    • Resources/: Folder containing the CSV file (election_data.csv).
    • analysis/: Folder containing the text file with election analysis results.

Instructions

PyBank Analysis

The PyBank script analyzes financial records to calculate:

  • Total number of months
  • Net total amount of "Profit/Losses"
  • Changes in "Profit/Losses" over the entire period and the average of those changes
  • Greatest increase in profits (date and amount)
  • Greatest decrease in profits (date and amount)

The analysis results are printed to the terminal and exported to a text file (analysis/financial_analysis.txt).

PyPoll Analysis

The PyPoll script analyzes election data to calculate:

  • Total number of votes cast
  • List of candidates who received votes
  • Percentage of votes each candidate won
  • Total number of votes each candidate won
  • Winner of the election based on popular vote

The analysis results are printed to the terminal and exported to a text file (analysis/election_results.txt).

Usage

  1. Clone the repository:

    git clone https://github.com/your-username/python-challenge.git
  2. Navigate to the respective folders (PyBank or PyPoll).

  3. Run the respective Python script (main.py) for analysis:

    python main.py

Requirements

  • Python 3.x
  • CSV module

python-challenge's People

Contributors

cidscapital avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.