CONTENTS
Introduction
Theoretical Background
ATM
Functions of proposed System
System Implimentation
Coding
Output
Conclusion
References
INTRODUCTION
Python is a popular programming
language. It was created by Guido
van Rossum, and released in 1991.
It is used for:
web development (server-side),
software development,
mathematics,
system scripting.
What can Python do?
Python can be used on a server
to create web applications.
Python can be used alongside
software to create workflows.
Python can connect to database
systems. It can also read and
modify files.
Python can be used to handle
big data and perform complex
mathematics.
Python can be used for rapid
prototyping,or for production-
ready software development.
THEORETICAL
BACKGROUND
Introduction and Concepts:
A database is a collection of
information related to a particular
subject or purpose, such as
tracking customer orders or
maintaining a music collection.
Using any RDBMS application
software like MS SQL Server,
MySQL, Oracle, Sybase etc, you can
manage all your information from a
single database file. Within the file,
divide your data into separate
storage containers called tables.
You may and retrieve the data
using queries.
What is my SQL ?
MySQL is a database
management system. A
database is a structured
collection of data. It may be
anything from a simple shopping
list to a picture gallery or the
vast amounts of information in a
corporate network. To add,
access, and process data stored
in a computer database, you
need a database management
system such as MySQL Server.
Since computers are very good
at handling large amounts of
data, database management
systems play a central role in
computing, as standalone
utilities, or as parts of other
applications. MySQL is a
Relational Database
Management System (RDBMS)
software that provides many
things, which are as follows:
It allows us to implement
database operations on tables,
rows, columns, and indexes.
It defines the database
relationship in the form of tables
(collection of rows and columns),
also known as relations.
It provides the Referential
Integrity between rows or
columns of various tables.
It allows us to updates the table
indexes automatically.
A.T.M
(Automated Teller
Machine)
An automated teller machine (ATM) is
an electronic banking outlet that
allows customers to complete basic
transactions without the aid of a
branch representative or teller. Anyone
with a credit card or debit card can
access cash at most ATMs, either in the
U.S. or other countries.
ATMs are convenient, allowing
consumers to perform quick self-
service transactions such as deposits,
cash withdrawals, bill payments, and
transfers between accounts.
ATM Design Elements
The design of each ATM may be
different, but they all contain the same
basic parts:
Card reader: This part reads the
chip on the front of your card or the
magnetic stripe on the back.
Keypad: The keypad is used to input
information, including your personal
identification number (PIN), the
type
transaction required, and the
amount of the transaction.
Cash dispenser: Bills are dispensed
through a slot in the machine,
which is connected to a safe at the
bottom of the machine.
Printer: If required, you can request
receipts that are printed out of the
ATM. The receipt records the type of
transaction, the amount, and the
current account balance.
Screen: The ATM issues prompts
that guide you through the
process of executing the
transaction. Information about
accounts and their balances is
also transmitted on the screen.
ATM Simulator project is written in
Python. The project file contains a
python script ([Link]). This is a
simple console based system which
is very easy to use. Talking about
the system, it contains various
functions which include Account
Statement, Withdrawing,
Depositing amount and changing
the pin. Here, at first the user has
to enter an existing username,
when the username matches the
system proceed toward the next
procedure i.e asking pin number.
When a user passes all these sign-
in procedures, he/she can use all
those features. It is too, he/she can
check their respective account
statements
Functions of
Proposed System:
Validating the Atm card
Asking the user for options to
perform next task
In case withdrawal is
selected, we should check the
balance accordingly
Deposits
Balance Enquiry
Logout and login function
SYSTEM
IMPLIMENTATION
HARDWARE USED
Processor : Intel core 13
Hard disk : 30 Gb
Ram : 1024 Gb
Software used
Operating System :
Windows
Platform : Python IDLE 3.7
Database : MYSQL server
5.1
Languages : Python
CODING :-
import getpass
import os
users = ['user1', 'user2', 'user3']
pins = ['1111', '2222', '3333']
amounts = [1000, 2000, 3000]
while True:
user = input('ENTER USER
NAME: ').lower()
if user in users:
n = [Link](user) #
Get the index of the user
break
else:
print('----------------')
print('****************')
print('INVALID USERNAME')
print('****************')
print('----------------')
count = 0 # To count the
number of PIN attempts
while count < 3:
print('------------------')
pin =
[Link]('PLEASE ENTER
PIN: ')
print('------------------')
if [Link]() and len(pin) ==
4:
if pin == pins[n]:
print('-------------------------')
print('*************************')
print('LOGIN
SUCCESSFUL, CONTINUE')
print('*************************')
print('-------------------------')
print('--------------------------')
print('**************************')
print([Link](users[n]),
'welcome to ATM')
print('**************************')
print('----------ATM
SYSTEM-----------')
break
else:
count += 1
print('-----------')
print('***********')
print('INVALID PIN')
print('***********')
print('-----------')
print()
else:
print('------------------------')
print('************************')
print('PIN MUST BE 4
DIGITS')
print('************************')
print('------------------------')
count += 1
if count == 3:
print('-----------------------------------')
print('*****************************
******')
print('3 UNSUCCESSFUL PIN
ATTEMPTS, EXITING')
print('!!!!!YOUR CARD HAS
BEEN LOCKED!!!!!')
print('*****************************
******')
print('-----------------------------------')
exit()
# Main menu
while True:
print('-------------------------------')
print('*****************************
**')
response = input('SELECT
FROM FOLLOWING OPTIONS:\
nStatement__(S)\
nWithdraw___(W)\nDeposit__(D)\
nChange PIN_(P)\nQuit_______(Q)\
n: ').lower()
print('*****************************
**')
print('-------------------------------')
valid_responses = ['s', 'w', 'd',
'p', 'q']
if response == 's':
print('------------------------------------
---------')
print('*****************************
****************')
print([Link](users[n]),
'YOU HAVE', amounts[n],
'RUPEES ON YOUR ACCOUNT.')
print('*****************************
****************')
print('------------------------------------
---------')
elif response == 'w':
cash_out = int(input('ENTER
AMOUNT YOU WOULD LIKE TO
WITHDRAW: '))
if cash_out % 10 != 0:
print('------------------------------------
------------------')
print('*****************************
*************************')
print('AMOUNT YOU
WANT TO WITHDRAW MUST
MATCH 10 RUPEE NOTES')
print('*****************************
*************************')
print('------------------------------------
------------------')
elif cash_out > amounts[n]:
print('-----------------------------')
print('*****************************
')
print('YOU HAVE
INSUFFICIENT BALANCE')
print('*****************************
')
print('-----------------------------')
else:
amounts[n] -= cash_out
print('-----------------------------------')
print('*****************************
******')
print('YOUR NEW
BALANCE IS:', amounts[n],
'RUPEES')
print('*****************************
******')
print('-----------------------------------')
elif response == 'd':
cash_in = int(input('ENTER
AMOUNT YOU WANT TO DEPOSIT:
'))
if cash_in % 10 != 0:
print('------------------------------------
----------------')
print('*****************************
***********************')
print('AMOUNT YOU
WANT TO DEPOSIT MUST MATCH
10 RUPEE NOTES')
print('*****************************
***********************')
print('------------------------------------
----------------')
else:
amounts[n] += cash_in
print('------------------------------------
----')
print('*****************************
***********')
print('YOUR NEW
BALANCE IS:', amounts[n],
'RUPEES')
print('*****************************
***********')
print('------------------------------------
----')
elif response == 'p':
new_pin =
[Link]('ENTER A NEW
PIN: ')
if new_pin.isdigit() and
len(new_pin) == 4 and new_pin !
= pins[n]:
new_ppin =
[Link]('CONFIRM NEW
PIN: ')
if new_ppin == new_pin:
pins[n] = new_pin
print('NEW PIN
SAVED')
else:
print('------------')
print('************')
print('PIN MISMATCH')
print('************')
print('------------')
else:
print('------------------------------------
-')
print('*****************************
********')
print('NEW PIN MUST
CONSIST OF 4 DIGITS AND MUST
BE DIFFERENT TO PREVIOUS
PIN')
print('*****************************
********')
print('------------------------------------
-')
elif response == 'q':
exit()
else:
print('------------------')
print('******************')
print('RESPONSE NOT
VALID')
print('******************')
print('------------------')
OUTPUT :-
CONCLUSION
Python project on ATM
management is successfully
performed with all the
operations The project is
implemented using Python
programming language, with a
simple command-line interface
for user interaction. It
incorporates basic error
handling to ensure robustness
and user-friendly messages to
guide users through the process.
The project also includes data
storage for account information
and transaction history,
maintaining data
[Link], the ATM
Python project serves as a
practical example of a banking
system, demonstrating
fundamental concepts of
programming, user
authentication, and data
management.
REFERENCES
In order to work on this project
titled ATM MANAGEMENT, the
following books and literature
are refered by me during the
various phases of development
of the project.
(1) [Link]
(2) [Link]
(3) Informatics Practices for
class XII
-by Sumita Arora & Preeti
Arora
Website:
[Link]
Other than the above-mentioned
books, the suggestions and
supervision of my teacher and
my class experience also helped
me to develop this software
project.