Project Level 2: Intermediate
This project is designed for intermediate learners who know Python fundamentals and are practicing building complete programs.
Project Description
Create a basic console-based banking system where users can:
Create accounts
Deposit money
View balance
Exit the system.
How the Project Works
The screenshot below shows how the program works. The user creates an account, deposits money, views the balance, and exits:
Consider using OOP/classes to build the program. Below is a structure to get you started and in the “Show Code” button you will find the complete solution.
class Account:
def __init__(self, name, initial_deposit):
self.name = name
self.balance = initial_deposit
def deposit(self, amount):
...
def view_balance(self):
...
class BankSystem:
def __init__(self):
self.accounts = {}
def create_account(self):
...
def deposit_money(self):
...
def view_balance(self):
...
def run(self):
while True:
print("\n1. Create Account\n2. Deposit Money\n3. View Balance\n4. Exit")
choice = input("Enter choice: ")
if choice == '1':
...
if __name__ == "__main__":
bank_system = BankSystem()
bank_system.run()
To keep it simple, just save the data (i.e., accounts, deposits, etc) in variables instead of external files/databases.
Prerequisites
Required Libraries: No libraries are required.
Required Files: No files are required.
IDE: You can use any IDE on your computer to code the project.
Danger Zone
Once you code the project, compare it with our solution below: