Coder Social home page Coder Social logo

bank_app's Introduction

Skillup Africa Beneficiary Challenge

Project Brief

Write a Python program that allows customers to:

  • Create an account with the account number generated if they do not have an account. All generated account numbers should begin with 0
  • Log in to the program if they have an account
  • Deposit money
  • Withdraw money from the account if they have a sufficient amount.
  • Users should be able to transfer money to other users in the account.
  • Users should be able to check their account balances.
  • The program should keep running until the user decides to make it log out and/or quit.
  • The account data should be stored in a dictionary that looks like this:
{
"0123445677" : { 
"first_name":"John", 
"last_name" : "Doe ", 
"login_pin" : "8424",
"transaction_pin" : "0934", 
"balance" : 0 }
}

Install Dependencies

  1. Python 3.7 - Follow instructions to install the latest version of python for your platform in the python docs

  2. Virtual Environment - We recommend working within a virtual environment whenever using Python for projects. This keeps your dependencies for each project separate and organized. Instructions for setting up a virual environment for your platform can be found in the python docs

Set up Storage for Persistence

The dictionary which contains users details is stored in a .txt file. Navigate to your project folder and create a .txt file containing an empty dictionary.

with open('bank_app_db.txt', 'r') as file:data = eval(file.read()) and

with open('bank_app_db.txt', 'w') as file:file.write(str(data))

for persistence

Documentation

The project makes use of Pythons Data Structures, Algorithms, Methods and makes use of the following functions:

def deposit()

  • To deposit money.

def withdraw()

  • To withdraw money if user balance is sufficient.

def account_num()

  • To generate a random account number starting with '0'

bank_app's People

Watchers

Anthony Oliko 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.