ATM Project - Py
ATM Project - Py
2
CRPF CAMPUS,
BHUBANESWAR
ATM PROJECT
ACKNOWLEDGEMENT
WHY PYTHON?
• Python works on different platforms
(Windows, Mac, Linux, Raspberry Pi,
etc).
• Python has a simple syntax similar
to the English language.
• Python has syntax that allows
developers to write programs with
fewer lines than some other
programming languages.
• Python runs on an interpreter
system, meaning that code can be
executed as soon as it is written.
This means that prototyping can be
very quick.
• Python can be treated in a
procedural way, an object-
orientated way or a functional way.
• The most recent major version of
Python is Python 3. However,
Python 2, although not being
updated with anything other than
security updates, is still quite
popular.
• Python will be written in a text
editor. It is possible to write Python
in an Integrated Development
Environment, such as Thonny,
Pycharm, NetBeans or Eclipse which
are particularly useful when
managing larger collections of
Python files.
• Python was designed for readability,
and has some similarities to the
English language with influence
from mathematics.
• Python uses new lines to complete
a command, as opposed to other
programming languages which
often use semicolons or
parentheses.
• Python relies on indentation, using
whitespace, to define scope Such as
the scope of loops, functions and
classes. Other programming
languages often use curly-brackets
for this purpose.
ATM
EXISTING SYSTEM
The ATM software project is a desktop
application that is developed with the
basic operational features of ATM (i.e.
Automated Teller Machine). The
existing system of the ATM software
has two admin and user accounts that
have different functionalities according
to the privilege and permissions
granted for these two different
accounts. As per the operational terms
of the software, with the existence of
two different operating accounts, the
ATM software works together with the
software as provided by the bank, with
the defined interfaces for
communication. After inserting the
ATM card into the ATM machine, the
software verifies the access code.
Then it asks for the nature of the cash
transaction, whether it is a cash
withdrawal or cash deposit. Then it
asks for the ATM PIN. After inserting
the PIN by the user, the system verifies
the PIN and asks for the amount of the
cash, and even asks for the
denominations of the notes. On
matching the criteria and availability of
the cash, it dispenses the cash, finishes
the transaction, and prints the receipt.
PROPOSED SYSTEM
Apart from the withdrawal of the cash
from this system, the deposit of cash is
also approved in the system, with all
kinds of denominations of notes. The
inclusion of the database tables in the
system helps in the proper recording of
the data in the admin and user tables.
This helps in fetching the information
with permissions from database tables.
After dispensing the cash from the
system, it also displays the updated
account balance for providing the
correct information to the user
regarding the account balance.
='root',password='manager',database='
ATM_MACHINE') c1=conn.cursor()
print("===========================
================================
=====================")
print("===========================
================================
=====================")
================================
=====================")
if op==1:
c="y" while
c=="y":
m=int(input("Enter a 4 digit
number as accont number:"))
cb="select * from records where
ACCONT_NO={}".format(m)
c1.execute(cb)
d=c1.fetchall()
data=c1.rowcount if
data==1:
print("===========================
================================
=====================")
print("===========================
================================
=====================")
if c=="y":
continue
else:
print("Thank you.")
print("Visit again")
print("===========================
================================
=====================")
else:
name=input("Enter your
name:")
passw=int(input("Enter your
pass word:"))
ab="insert into
records(ACCONT_NO,PASSWORD,NAM
E) values({},
{},'{}')".format(m,passw,name
)
print("===========================
================================
=====================")
c1.execute(ab)
conn.commit()
print("Account sucessfully created")
print("===========================
================================
=====================")
balance=cr_amt-withdrawl where
ACCONT_NO={}".format(m)
c1.execute(ef)
conn.commit()
print("sucessfully deposited")
print("Thank you")
print("Visit again")
break if op==2: y="y"
while y=="y":
acct=int(input("Enter your
account number:"))
pas=int(input("Enter your
password :"))
print("===========================
================================
=====================")
e="select password from
records where
ACCONT_NO={}".format(acct)
c1.execute(e)
a=c1.fetchone()
d=list(a) if
pas==d[0]:
print("correct")
print("1.Depositng
money")
print("2.withdrawing
money")
print("3.Transfering
money")
print("4.Checking
balance")
print("5.Changing
Account number ")
print("===========================
================================
=====================")
r=int(input("Enter your
choice:"))
print("===========================
================================
=====================")
if r==1:
amt=int(input("Enter
the money to be deposited:"))
print("===========================
================================
=====================")
balance=cr_amt-withdrawl where
ACCONT_NO={}".format(acct)
c1.execute(ef)
conn.commit()
print("sucessfully
deposited")
print("===========================
================================
=====================")
if t=="y":
continue
else: print("Thank you")
if r==2:
amt=int(input("Enter
the money to withdraw:"))
print("===========================
================================
=====================")
ah="select BALANCE
from records where
accont_no={}".format(acct)
c1.execute(ah)
m=c1.fetchone() if
amt >m[0]: print("Your are
print("===========================
================================
=====================")
else:
sr="update records
set balance=balance - {} where
ACCONT_NO={}".format(amt,acct)
ed="update
records set WITHDRAWL ={} where
ACCONT_NO={}".format(amt,acct)
c1.execute(ed)
c1.execute(sr)
conn.commit()
print("Sucessfully
updatad")
y=input("do you want
to continue y/n -") if
y=="y":
continue
else:
print("Thank you")
if r==3:
act=int(input("Enter
print("===========================
================================
=====================")
cb="select * from
records where
ACCONT_NO={}".format(act)
c1.execute(cb)
c1.fetchall()
data=c1.rowcount if
data==1:
print(act ,"number
exists")
m=int(input("Enter
the money to be transferred :"))
print("===========================
================================
=====================")
ah="select
BALANCE from records where
accont_no={}".format(acct)
c1.execute(ah)
c=c1.fetchone() if
m > c[0]:
print("Your are
having less than",m)
print("Please
try again")
print("===========================
================================
=====================")
else:
av="update
print("Sucessfully transfered")
y=input("do you
want to continue y/n -")
if y=="y":
continue
else:
print("Thank
you") if
r==4:
ma="select balance
from records where
accont_no={}".format(acct)
c1.execute(ma)
k=c1.fetchone()
print("Balance in your
account=",k)
print("===========================
================================
=====================")
continue
else: print("Thank
you") if r==5:
i=int(input("Enter your
new account number:"))
cb="select * from
records where
ACCONT_NO={}".format(i)
c1.execute(cb)
c1.fetchall()
data=c1.rowcount if
data==1:
print("This number
already exists")
print("Try again")
y=input("do you
want to continue y/n -")
if y=="y":
continue
else:
print("Thank
you")
else:
name=input("Enter
your name")
ar="Update
records set accont_no={} where
name='{}' and
password={}".format(i,name,pas)
c1.execute(ar)
conn.commit()
print("Your new
print("Wrong password")
print("===========================
================================
=====================")
else:
print("your Account does not
exists")
if op==3:
print("Exiting")
c1.close()
INSTALLATION PROCEDURE
ATM MACHINE:-
Pre-Requisites :
Installation :-
1. There will be two folders namely
'Python Files' and 'EXE files' in the
folder 'Source Code'.
2. The folder 'Python Files' will contain
the source code of the software in
python language. If you are running the
software by the 3rd step mentioned
below you have to pre install the
following modules :-
I) mysql.connector or pymysql
II) matplotlib.
3. Open the files in any python editors
and run it to start and work on the
software.
4. The folder 'EXE files' will contain two
files namely 'main.exe' and
'Tables_in_mysql.exe'.
CAUTION :-
If you are running the software
through running the python files or by
running the .exe files ; first run the file
named 'Tables_in_mysql'.
The .exe file will take some time to
run; so be PATIENT.