0% found this document useful (0 votes)
10 views

Comp

Uploaded by

kuhelikabir100
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

Comp

Uploaded by

kuhelikabir100
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 20

BODHICARIYA SENIOR

SECONDARY SCHOOL

AISSCE 2024-25 COMPUTER


PROJECT

NAME: Ankit Ghosh


CLASS: XII

SECTION: commerce
ROLL NO:
TOPIC: BANK MANAGEMENT SYSTEM
ACKNOWLEDGEMENT

I would like to convey my sincere thanks to


my Computer teacher who always gave me valuable
suggestion and guidance during the project He was a
source of inspiration and helped me understand and
remember important details of the project. He gave me
an amazing opportunity to do this wonderful project.
I also thank my parents and friends for their help and
support in finalizing this project within the limited time
frame
CERTIFICATE

This is to certify that Subhransu Chaudhuri of


class XII has successfully completed the Computer
Project on the topic "Bank Management System' as
per the guidelines of class XII Board Examination
conducted by CBSE

External Examiner Internal Examiner


INDEX

1. Acknowledgment

2. Certificate

3. Features of the Project

4. Source Code

5. Output Screen

6. Hardware and software requirements

7. Bibliography
FEATURES OF THE SYSTEM-: PROPOSED

Bank where the user will be allowed to create, close or


perform other The program provides an interactive
computer-based system to interact with a operations
on his/her bank account. The user has to create at
least one bank account if the program is used for the
first time. A database would store all the details of
account. On launching the program, it opens the Main
Menu allowing user to new account -If the user does
not have any account yet or wants to have multiple
accounts in the Bank, they can opt for it. They have to
enter Create a certain details and then will be
provided with an account number and a password.
Manage Account if the user already has an account in
the system, they can performvarious operations on it
by logging in using A/c No. and Password.

Exit-To end the program


This activates that account and thereafter the users
can carry out the following Operations on their bank
account provided that they enter the correct
credentials on demand:

Fund Transfer - To transfer certain amount from


currently activated account to anotherpresent in the
system. Recurring Bill Payment -Just select the
Recipient's account and enter bill amount to set upon
Automatic Amount Transfer monthly from the
activated account Display customer detall's-Displays
Account Details on the Screen Request for a
Debit/Credit card-To make a request for a Debit or
Credit card from theBank as per user's choice.

Change Password - To update password

Close an account-To close the activated account and


delete all its data.
#SOURCE CODE

# Importing required libraries


import sqlite3 # For database management
import random # For generating random account and customer IDs

# Establishing a connection to SQLite database


connection = sqlite3.connect('bank_management.db')
cursor = connection.cursor()

# Create accounts table if it does not exist


cursor.execute("""
CREATE TABLE IF NOT EXISTS accounts (
account_no INTEGER PRIMARY KEY, -- Unique account number
customer_id INTEGER UNIQUE, -- Unique customer ID
name TEXT, -- Account holder's name
phone_no TEXT, -- Phone number
email TEXT, -- Email ID
aadhaar TEXT, -- Aadhaar number
dob TEXT, -- Date of Birth
balance REAL, -- Account balance
password TEXT -- Account password
);
""")
connection.commit() # Commit the table creation

# Function to generate random account and customer IDs


def generate_account_details():
"""Generates a unique account number and customer ID."""
account_no = random.randint(1000000000, 9999999999) # Random
10-digit account number
customer_id = random.randint(10000, 99999) # Random 5-digit
customer ID
return account_no, customer_id

# Function to create a new bank account


def create_account():
"""Creates a new account with user-provided details."""
print("\n--- Create New Account ---")
name = input("Enter Full Name: ")
phone_no = input("Enter Phone Number: ")
email = input("Enter Email Address: ")
aadhaar = input("Enter Aadhaar Number: ")
dob = input("Enter Date of Birth (YYYY-MM-DD): ")
balance = float(input("Enter Initial Deposit Amount: "))
password = input("Set Account Password: ")

# Generate unique account number and customer ID


account_no, customer_id = generate_account_details()

# Insert account details into the database


cursor.execute("""
INSERT INTO accounts (account_no, customer_id, name, phone_no,
email, aadhaar, dob, balance, password)
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)
""", (account_no, customer_id, name, phone_no, email, aadhaar, dob,
balance, password))
connection.commit() # Commit the transaction

print("\nAccount created successfully!")


print(f"Your Account Number: {account_no}")
print(f"Your Customer ID: {customer_id}")

# Function for user login


def login():
"""Authenticates user by Customer ID and Password."""
print("\n--- Login ---")
customer_id = input("Enter Customer ID: ")
password = input("Enter Password: ")

# Fetch user details from the database


cursor.execute("SELECT * FROM accounts WHERE customer_id = ? AND
password = ?", (customer_id, password))
account = cursor.fetchone()

if account:
print("\nLogin Successful!")
return account # Return the user's account details
else:
print("\nInvalid Customer ID or Password!")
return None

# Function to display account details


def display_account(account):
"""Displays the account details for a logged-in user."""
print("\n--- Account Details ---")
print(f"Account Number: {account[0]}")
print(f"Customer ID: {account[1]}")
print(f"Name: {account[2]}")
print(f"Phone Number: {account[3]}")
print(f"Email: {account[4]}")
print(f"Aadhaar Number: {account[5]}")
print(f"Date of Birth: {account[6]}")
print(f"Balance: {account[7]}")

# Function to deposit money


def deposit(account):
"""Allows the user to deposit money into their account."""
print("\n--- Deposit Money ---")
amount = float(input("Enter the amount to deposit: "))
if amount > 0:
new_balance = account[7] + amount
cursor.execute("UPDATE accounts SET balance = ? WHERE
account_no = ?", (new_balance, account[0]))
connection.commit() # Commit the transaction
print(f"Deposit successful! New Balance: {new_balance}")
else:
print("Invalid deposit amount!")

# Function to withdraw money


def withdraw(account):
"""Allows the user to withdraw money from their account."""
print("\n--- Withdraw Money ---")
amount = float(input("Enter the amount to withdraw: "))
if 0 < amount <= account[7]:
new_balance = account[7] - amount
cursor.execute("UPDATE accounts SET balance = ? WHERE
account_no = ?", (new_balance, account[0]))
connection.commit() # Commit the transaction
print(f"Withdrawal successful! New Balance: {new_balance}")
else:
print("Invalid withdrawal amount or insufficient balance!")
# Function to delete an account
def delete_account(account):
"""Deletes the logged-in user's account."""
print("\n--- Delete Account ---")
confirmation = input("Are you sure you want to delete your account?
(yes/no): ").lower()
if confirmation == 'yes':
cursor.execute("DELETE FROM accounts WHERE account_no = ?",
(account[0],))
connection.commit() # Commit the deletion
print("Account deleted successfully!")
return True
return False
# Main program loop
def main():
"""Main menu for the bank management system."""
while True:
print("\n--- Bank Management System ---")
print("1. Create Account")
print("2. Login")
print("3. Exit")
choice = input("Enter your choice: ")

if choice == '1':
create_account() # Create a new account
elif choice == '2':
account = login() # User login
if account:
while True:
print("\n--- Account Menu ---")
print("1. Display Account Details")
print("2. Deposit Money")
print("3. Withdraw Money")
print("4. Delete Account")
print("5. Logout")
sub_choice = input("Enter your choice: ")

if sub_choice == '1':
display_account(account) # Show account details
elif sub_choice == '2':
deposit(account) # Deposit money
elif sub_choice == '3':
withdraw(account) # Withdraw money
elif sub_choice == '4':
if delete_account(account): # Delete account
break
elif sub_choice == '5':
print("Logged out successfully!")
break
else:
print("Invalid choice!")
elif choice == '3':
print("Exiting system. Goodbye!")
break
else:
print("Invalid choice! Please try again.")

# Run the program


if __name__ == "__main__":
main()
#OUTPUT

1)main menu:-

2)creating acc:-
3)log in acc:-

4)acc details:-
5)Deposit Money :-

6)withdraw money:-
7)delete acc:-

8)Log out:-
HARDWAE and SOFTWARE REQIRMENTS

HARDWARE REQUIRMENTS:
Intel(R) Core(TM)2 Duo CPU E7500 @ 2.93GHz
Processor

memory 4.00 GB

Hard disk 50 MB

SOFTWARE REQUIRMENTS:

Operating System: 32-bit operating system

Programming IDE: Python idle


3.9.7 ,pycharm
BIBLIOGRAPHY

BOOKS REFERRED:

> Computer Science for class XII by Sumita Arora

SITES VISITED:

➤YouTube.com

You might also like