This project is a simple banking system simulation written in Python.
The goal of this project is to practice Object-Oriented Programming (OOP), data validation, and working with files such as Excel and text files.
The program allows users to create bank accounts and perform basic banking operations such as deposit, withdrawal, and money transfer.
This project was developed as a beginner Python project to practice programming concepts and build a small real-world style application.
The system supports the following operations:
Create a bank account Deposit money into an account Withdraw money from an account Edit account information View account balance Transfer money to another account
When creating an account, the following information is required:
First Name Last Name Phone Number Birthday National Code Account Balance (Inventory) Email Account Number Each account is assigned a unique randomly generated account number.
The system validates user input to ensure data correctness. Some examples include:
Name and last name must contain only letters Phone number must contain only digits Birthday must follow the format: YYYY-MM-DD National code must contain only digits Email must follow a valid format and use the gmail.com domain Account numbers are randomly generated and cannot be duplicated
User data is stored using two files:
Bank.txt
Temporary storage where new user information is written.
Bank.xlsx
The main database of the system.
The program uses pandas to read and update the Excel file whenever changes occur.
All operations such as deposit, withdrawal, editing information, and transfers will update the Excel file.
Python Pandas Excel file handling Object-Oriented Programming (OOP) Basic input validation
Main Python file that contains all classes and logic.
Bank.xlsx
Excel file used as the main database.
Bank.txt
Temporary text storage for new records before saving to Excel.
Validation
Handles validation of user inputs such as name, phone number, email, and date format.
SaveToExcel
Handles saving user data to text files and Excel files using pandas.
User
Contains the main banking operations such as account creation, deposit, withdrawal, editing information, balance checking, and money transfer.
Install the required libraries: pip install pandas openpyxl
Run the program: python Bank.py
Choose an option from the menu: Create an account Deposit to the account Withdraw from the account Change account details View account balance Transfer to another person’s account
This project helped practice:
Object-Oriented Programming in Python Input validation Working with Excel files using pandas File handling in Python Building a simple command line application
Melika Khaledi Mofrad
First Python project – Banking System Simulation