Git Product home page Git Product logo

ci-project-portfolio-9's Introduction

Project Portfolio 3- Python Essentials - Code Institute.

Budget App

The project will cover creating a budget manager. Its aim is to add a user, let them enter there income either by week, month or year. I will break down there income by week, month or year. After the user should be able to enter there budget,for this we will ask them to enter there budget name and the amount by month and we will work out there weekly and yearly costs. How much they want to spend and what they actually spent, and add it back to there income or minus it from that income. Then we can ask the user if they want to invest the remaining amount or a percentage of the remaining amount. For the investment we will also explain how long that invested amount will take to become 1,000,000 with interest from the initial investment.

Table of Contents

User Experience

  • As a user I want to be able to find out my income through out the year
  • I want the user to know there fortnight, monthly and yearly incomes
  • I want to be able to create budgets and find out what the spendings are
  • I want to be able to display the information as it helps users to see rather then have it in the back ground
  • After I want to help get the idea to invest by using simple interest.
  • I want it to be a simple app for a User

Site Aims:

  • I wanted to learn Python and show my logic with a budget, app as we are experiencing higher inflation in Europe.
  • I want to show the importance of saving and budgeting
  • I want to show the importance of investing

How Is This Will Be Achieved:

  • By using Github, Python and heroku.

Flowchart

Flowchart

Tech used

  • For this project I used Github to save my project.
  • I used Gitpod as my editor for the code.
  • I used python for the code in the project.
  • I used HeroKu for deployment of this project
  • Functions and Imports

    • Main() this starts the project in run.py

    • Heading() creates a table that I used for a heading for this project.

    • I created functions in Income_broken_down to find out differnt values of income throughout the year

    • week_income_to_fortnight(week_income) Calculates the week income to an income for every 2 weeks

    • week_income_to_monthly(week_income) Calculates the week income to an income for every 4 weeks

    • week_income_to_year(week_income) Calculates the week income to an income for every 48 weeks (more information in testing)

    • Created functions to divide the month to week (more in testing)

    • Created functions to divide the year to week (more in testing)

    • Created functions to divide the year to month (more in testing)

    • userInputBudget() Allows user to input there budgets

    • add_budget(name , amount) Creates the budget and adds it to a table

    • spend(name, amount) Notes the amount of money you spent and the name of the budget you want to keep track it against

    • print_summary() Creates the table for the budgets created.

    • interest_heading() Creates a table for the interest_calculator as a heading

    • interested_income() Finds a recommended amount to invest from your income after budget.

    • interest() Finds the calculated interested from interested_income and finds simple interest formula

    • I used Prettytable to create tables throughout my project

    • I used datetime for the interest_calculator to help find out how long it takes to become a millionaire

    • I used Colorama for colour in this project as having a plain text is abit boring

Testing

Used PEP8 for testing Used print(f"End of user confirmation user: {user} money: {available}\n") in confirm user to test the values. Used print(expenditure) return print(f"{remaining_from_budget} remaining from budget") in budget.py spend function and return print(budgets, available) add_budgets
This allowed me to test the values being entered

Validator Testing

Using PEP8 I came accoss issues in my code. Here are the before and after

Run.py before

Run.py

And After

Run.py

Confirm_user.py

Confirm_user.py

And After

Confirm_user.py

Income_broken_down.py

Income_broken_down.py

And After

Income_broken_down.py

budget.py

Budget.py

And After

budget

interst_calculator.py

interest_calculator

And After

interest_calculator

Link To Google Doc for testing

Google doc for testing Google-doc

and Image

Google-doc-testing

Bugs and Issues

  • I had to use 48 weeks instead of 52. As month income *12 did not add to the same value as week * 52.
  • Eg 200 * 52 = 10400 but 200 * 4 = 800 and 800 * 12 = 9600
  • In budget.py I wanted the left over income to be taken away each time a new budget was created and print the value before it is taken away. It only prints out the final value after it is taken away.

Deployment

GitHub

  • Login to GitHub
  • Click "Repository" and select "New"
  • Give the repository a name and description and then click "Create repository"
  • Click "Gitpod" to start editing
  • In the terminal enter "python3 run.py" to run your code

Heroku

  • Click "New" and select "Create new app".
  • Input a meaningful name for your app and choose the region best suited to your location.
  • Select "Settings" from the tabs.
    • Click "Reveal Config Vars".
    • Input PORT and 8000 as one config var and click add.
    • Click "Add buildpack".
    • Add "nodejs" and "python" from the list or search if necessary, remember to click save.
    • The ordering is as follows:
      1. heroku/python
      2. heroku/nodejs
    • Python must be the first buildpack. They can be dragged into the correct position if needed.
  • Select "Deploy" from the tabs.
    • Select "GitHub - Connect to GitHub" from deployment methods.
    • Click "Connect to GitHub" in the created section.
    • Search for the GitHub repository by name.
    • Click to connect to the relevant repo.
    • Either click Enable Automatic Deploys for automatic deploys or Deploy Branch to deploy manually. Manually deployed branches will need re-deploying each time the repo is updated.
    • Click View to view the deployed site.
  • The live site can also be accessed from your repo in GitHub from the environments section of the repo.
    • Click the link to view deployments history.
    • Click View deployment. This page also shows all the deployment history.
      The site is now live and operational

Make a clone

  • Login to GitHub
    • Click "Repository" and select "project"
      • Click the "Code" dropdown menu.
    • Click "Clone with HTTPS" and copy the link
      • Open IDE "Ternimal" in local machine
    • Type "git clone" followed by URL
    • Press "Enter" to create clone

Credits

ci-project-portfolio-9's People

Contributors

excellentwish 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.