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

ATM Management Project Class 12th

ATM Management Project Class 12th for CBSE Computer Science with Python
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views

ATM Management Project Class 12th

ATM Management Project Class 12th for CBSE Computer Science with Python
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 22

INTRODUCTION

1
INTRODUCTION
The ATM Python project is a simple yet comprehensive implementation of an Automated
Teller Machine (ATM) system, designed to simulate core banking functions in a secure and
user-friendly environment. The project aims to provide users with an interactive command-
line interface that allows them to perform essential banking transactions such as checking
balances, withdrawing and depositing money, transferring funds, and viewing transaction
history. It serves as a practical demonstration of key programming concepts, user
authentication, transaction management, and basic data storage.

One of the central features of the ATM system is user authentication. To access their
accounts, users must enter a valid PIN, ensuring that only authorized individuals can perform
transactions. This security measure helps maintain privacy and prevent unauthorized access
to sensitive account information. The PIN verification process is a fundamental part of the
system, providing a simple yet effective method for securing user data.

The balance inquiry feature allows users to check the available balance in their accounts at
any time. By simply selecting the balance check option from the menu, users can view how
much money they have, ensuring transparency and ease of access. This feature is particularly
useful for users to monitor their funds before making any transactions, helping them avoid
overdrafts or errors in their financial planning.

Cash withdrawal is another key function of the system. Users can withdraw a specified
amount from their account, and the system automatically updates the balance accordingly.
The ATM ensures that users cannot withdraw more money than their available balance,
preventing them from exceeding their account limits. Additionally, error handling
mechanisms are in place to guide users if they attempt to withdraw an amount higher than
their balance or input invalid values.

The cash deposit function allows users to deposit money into their accounts. Users provide
the deposit amount, and the system adds the funds to their account balance, updating the
balance in real-time. This feature is essential for users to maintain and grow their funds,
facilitating easy and secure deposits directly through the ATM.

The fund transfer feature supports transferring money between accounts, allowing users to
send money to different account numbers, whether for personal transactions or paying bills.
This function ensures that the system processes transfers securely and updates both the
sender’s and recipient’s balances accordingly. The fund transfer feature is vital for providing
a complete banking experience, allowing users to move money across various accounts as
needed.

The transaction history feature allows users to view a summary of their recent transactions.
This includes records of withdrawals, deposits, and transfers, providing a clear overview of
their account activity. By tracking transaction history, users can ensure that all their financial
activities are accurate and up-to-date. The transaction history feature also helps users review
their past interactions with the system, offering a means of confirming previous actions and
maintaining an audit trail.

2
Finally, after completing any desired transactions, users can securely log out from the
system, ensuring that their session ends and no unauthorized individuals can access their
account. This adds an additional layer of security, preventing others from accessing personal
information or making unauthorized transactions.

The entire system is implemented using Python, providing a robust and straightforward
solution for simulating ATM operations. The project also incorporates error handling to
ensure a smooth user experience, preventing system crashes and providing helpful messages
for incorrect actions or inputs. Data for account information and transaction history is stored
securely, ensuring data integrity throughout the process.

Overall, the ATM Python project is an excellent example of how basic programming
concepts can be applied to create a functional and secure banking system. It demonstrates the
importance of user authentication, data management, and transaction handling while
providing an intuitive interface for users to interact with.

3
SOFTWARE
SPECIFICATION

4
SOFTWARE SPECIFICATION

Frontend: IPython Console (Anaconda Python distribution)

Backend: MySQL (managed through MySQL Workbench)

Python IDE: Spyder IDE v5.5.1

Python Version: 3.12.7 (version installed with Anaconda)

Database Management Tool: MySQL Workbench (latest version)

Operating System: Windows 11

5
TABLES

6
TABLES

7
SOURCE CODE

8
SOURCE CODE

import mysql.connector

# Establish connection to MySQL

def connect_to_db():

return mysql.connector.connect(

host="localhost",

user="root",

password="mypass",

database="atm_system"

# Create a new account

def create_account():

conn = connect_to_db()

cursor = conn.cursor()

account_number = int(input("Enter a new account number: "))

pin = int(input("Set a 4-digit PIN: "))

# Insert the new account into the database

cursor.execute("INSERT INTO accounts (account_number, pin) VALUES


(%s, %s)", (account_number, pin))

conn.commit()

9
print("Account created successfully!")

cursor.close()

conn.close()

# User login

def login():

conn = connect_to_db()

cursor = conn.cursor()

account_number = int(input("Enter your account number: "))

pin = int(input("Enter your PIN: "))

cursor.execute("SELECT * FROM accounts WHERE account_number = %s


AND pin = %s", (account_number, pin))

account = cursor.fetchone()

if account:

print("Login successful!")

return account_number

else:

print("Invalid account number or PIN.")

return None

# Balance inquiry

def check_balance(account_number):

10
conn = connect_to_db()

cursor = conn.cursor()

cursor.execute("SELECT balance FROM accounts WHERE account_number


= %s", (account_number,))

balance = cursor.fetchone()[0]

print(f"Your current balance is: ₹{balance}")

cursor.close()

conn.close()

# Deposit money

def deposit(account_number):

conn = connect_to_db()

cursor = conn.cursor()

amount = float(input("Enter the amount to deposit: ₹"))

cursor.execute("UPDATE accounts SET balance = balance + %s WHERE


account_number = %s", (amount, account_number))

conn.commit()

print(f"₹{amount} deposited successfully!")

cursor.close()

conn.close()

11
# Withdraw money

def withdraw(account_number):

conn = connect_to_db()

cursor = conn.cursor()

amount = float(input("Enter the amount to withdraw: ₹"))

# Check if sufficient balance is available

cursor.execute("SELECT balance FROM accounts WHERE account_number


= %s", (account_number,))

balance = cursor.fetchone()[0]

if amount > balance:

print("Insufficient balance.")

else:

cursor.execute("UPDATE accounts SET balance = balance - %s WHERE


account_number = %s", (amount, account_number))

conn.commit()

print(f"₹{amount} withdrawn successfully!")

cursor.close()

conn.close()

# Transfer money to another account

12
def transfer_funds(account_number):

conn = connect_to_db()

cursor = conn.cursor()

target_account = int(input("Enter the account number to transfer to: "))

amount = float(input("Enter the amount to transfer: ₹"))

# Check if sufficient balance is available

cursor.execute("SELECT balance FROM accounts WHERE account_number


= %s", (account_number,))

balance = cursor.fetchone()[0]

if amount > balance:

print("Insufficient balance.")

else:

# Deduct from sender's account

cursor.execute("UPDATE accounts SET balance = balance - %s WHERE


account_number = %s", (amount, account_number))

# Add to recipient's account

cursor.execute("UPDATE accounts SET balance = balance + %s WHERE


account_number = %s", (amount, target_account))

conn.commit()

print(f"₹{amount} transferred successfully!")

13
cursor.close()

conn.close()

# Menu options

def atm_menu():

while True:

print("\nWelcome to the ATM!")

print("1. Create Account")

print("2. Login")

print("3. Exit")

choice = int(input("Enter your choice: "))

if choice == 1:

create_account()

elif choice == 2:

account_number = login()

if account_number:

while True:

print("\nATM Menu")

print("1. Balance Inquiry")

print("2. Deposit Money")

print("3. Withdraw Money")

print("4. Transfer Funds")

14
print("5. Logout")

user_choice = int(input("Choose an option: "))

if user_choice == 1:

check_balance(account_number)

elif user_choice == 2:

deposit(account_number)

elif user_choice == 3:

withdraw(account_number)

elif user_choice == 4:

transfer_funds(account_number)

elif user_choice == 5:

print("Logged out successfully!")

break

else:

print("Invalid choice! Please try again.")

elif choice == 3:

print("Thank you for using the ATM!")

break

else:

print("Invalid option! Please choose again.")

# Start the ATM

atm_menu()

15
INPUT/OUTPUT
SCREEN

16
17
18
19
20
CONCLUSION

21
CONCLUSION

The ATM Management system is a significant improvement over traditional


banking methods, where manual transactions often lead to delays and errors.
The computerization of the system has greatly accelerated the process of
managing accounts and transactions. This ATM management system was
thoroughly tested with sample data and was found to be efficient and reliable
for everyday banking operations.

ADVANTAGES

Fast and Reliable: The system processes transactions quickly, providing


immediate feedback to users.

Reduces Errors: Automating transactions minimizes human errors and avoids


issues such as data redundancy and inconsistency.

User-Friendly Interface: The menu-driven interface is simple and intuitive,


making it easy for users to operate.

Easy Data Access: The system allows users to access their account information
and transaction history effortlessly.

Less Manual Effort: It reduces the need for staff intervention, streamlining
operations.

Enhanced Security: User authentication through account numbers and PINs


provides greater security for account access and transactions.

Data Integrity: The system ensures the accurate handling and storage of
financial data, maintaining trustworthiness and accuracy in transactions.

22

You might also like