You are on page 1of 22

A Mini project Report

On

ATM SIMULATION THROUGH PYTHON


A project report submitted in partial fulfillment of the academic requirements for the award

of degree of

BACHELOR OF TECHNOLOGY

In

CIVIL ENGINEERING

By

OSA SRIKANTH 17H51A0144

SHRAVANI 17H51A0148

PULIRAM MOHAN RITESH 17H51A0149

GOUTHAMI 17H51A0155

Under the guidance of

------------

CMR COLLEGE OF ENGINEERING & TECHNOLOGY


(Autonomous)

Approved by AICTE, permanently Affiliated to JNTUH, Hyderabad.

An NBA Accredited Institution

Kandlakoya(V), Medchal-501401
DEPARTMENT OF CIVIL ENGINEERING

CMR COLLEGE OF ENGINEERING & TECHNOLOGY

(Autonomous)
Approved by AICTE, permanently Affiliated to JNTUH, Hyderabad.

An NBA Accredited Institution

Kandlakoya(V), Medchal-501401

BONAFIDE CERTIFICATE

This is to certify that the dissertation entitled “ATM SIMULATION THROUGH


PYTHON” is the bonafide done by OSA SRIKANTH(17H51A0144),
SHRAVANI(17H51A0148), PULIRAM MOHAN RITESH(17H51A0149),
GOUTHAMI(17H51A0155) submitted in partial fulfillment of the academic
requirements for the award of degree of Bachelor of Technology, submitted to the Civil
Engineering, CMR College of Engineering & Technology, Hyderabad during the period
2020-2021

Signature of the Guide Signature of HOD

------------- ---------------

Asst. professor Professor & Head

Department of Civil Engineering Department of Civil Engineering


CMRCET CMRCET
CMR COLLEGE OF ENGINEERING & TECHNOLOGY

DEPARTMENT OF CIVIL ENGINEERING

DECLARATION

We hereby declare that the work described in the project report “ATM SIMULATAIN
THROUGH PYTHON “ has been carried under the guidance and supervision of
-------------, Assistant professor, CMRCET towards the partial fulfillment of the award of
the degree of bachelor of technology in civil engineering from CMR college of
engineering and technology, Hyderabad. This work is the original and has not been
submitted either in part or in full for the award of any other degree or diploma of any
other university

OSA SRIKANTH (17H51A0144)

SHRAVANI (17H51A0148)

PULIRAM MOHAN RITESH (17H51A0149)

GOUTHAMI (17H51A0155)
ACKNOWLEDGEMENT

I am deeply indebted to our guide --------------, --------------, whose help, stimulating


suggestions and encouragement helped me in all the time for writing the report.

I would like to express my sincere thanks and gratitude to Dr. K. SURESH, Professor and
Head, Department of civil engineering, for his valuable suggestions and advice for
carrying out this thesis work.

I would like to thank the Faculty of Department of Civil Engineering for their positive
and helpful approaches for my engineering education and also the non-teaching staff for
their assistance.

I am grateful and thankful to the principal Major Dr. V. A. NARAYANA,


CMR COLLEGE OF ENGINEERING AND TECHNOLOGY and the management
CH. GOPAL REDDY, Correspondent & secretary for providing all the necessary
facilities for carrying out this work.

Finally, I would like to express my deepest gratitude to my parents whose patient love
enabled me to complete this work. And at last but not the least I would like to thank God
for the successful completion of the project.
ABSTRACT:

The ATM is used by customers of a bank. Each customer has two accounts, a checking
account and a savings account. Each customer has a customer number and a Personal
Identification Number (PIN). Both must by typed into the simulation to gain access to the
accounts .Once they have gained access, the customers can select an account (checking or
savings). The balance of the selected account is displayed (initially zero). Then the
customers can deposit and withdraw money and the balance will be updated accordingly.
The application terminates when the user selects exit rather than an account. Since this is
a simulation, the ATM does not actually communicate with the bank. It simply loads a
list of customer numbers and PINs from a data file. The data file is maintained externally
to this application. This Application should interact with the user via a simple swing GUI.
TABLES OF CONTENTS:
Chapters:

 Introduction
 Problem definition
 Algorithm
 Implementation
 Result
 Conclusion
INTRODUCTION:

The aim of ATM Simulation System project is to build a python based ATM
(Automated Teller Machine) Simulation System. The Introduction of ATM by
various banks have brought about freedom from the interminable queues in front of
withdrawal counters at banks. This ATM Simulation System requires the constant
updating of records between the bank servers and a spread out network of ATM.

Security is the foundation of a good ATM system. This system will provide for
secure authenticated connections between users and the bank servers. The whole
process will be automated right from PIN (Personal Identification Number)
validation to transaction completion ATM Simulation System will enable two
important features of an ATM, reduction of human error in the banking system
and the possibility of 24 hours personal banking. The card details and PIN database
will be a secure module that will not be open to routine maintenance, the only
possibility of access to this database will be through queries raised from an ATM
in the presence of valid bank ATM card
PROBLEM DEFINITION:

THE SOURCE CODE DECLARED ABOVE FOR THE PROGRAM OF ATM


SIMULATION HAS BEEN TESTED AND IT HAS BEEN FOUND THAT THE
ABOVE SOURCE CODE IS OKAY AND CORRECT. THE PROGRAM
INVOLES MANY TYPE OF CONVERSIONS. THESE CONVERSIONS HAS
TO DONE CAREFULLY.

MAINLY THERE ARE TWO TYPES OF TESTING:

1. SYSTEM TESTING
2. INTERGRATION TESTING

SYSTEM TESTING INVOLVES WHOLE TESTING OF PROGRAM AT


ONCE AND INTEGRATION TESTING

INVOLVES THE BREAKING OF PROGRAM INTO MODULES & THEN


TEST

ALGORITHM/ STEP (Explain the different modules/functions used)

1. We have run the program in python IDLE


2. Our project is based on ATM SIMULATION
3. The functions of ATM Simulation are:
 Enter the correct user name and password to login
 Lodgement : This function helps us to deposit the money
 Withdrawal: Through this function we can take our money from
the machine
 Statement: We get the mini statement of our account
 Pin Change: Through this function we can change the pin of our
credit card.
 Quit: Function helps us to terminate the process.
IMPLEMENTATION:
#import getpass

import string

import os

# creatinga lists of users, their PINs and bank statements

users = ['user1', 'user2', 'user3']

pins = ['1111', '2222', '3333']

amounts = [1000, 2000, 3000]

count = 0

# while loop checks existance of the entered username

while True:

user = input('\nENTER USER NAME: ')

user = user.lower()

if user in users:

if user == users[0]:

n=0

elif user == users[1]:

n=1

else:

n=2

break

else:

print('----------------')
print('****************')

print('INVALID USERNAME')

print('****************')

print('----------------')

# comparing pin

while count < 3:

print('------------------')

print('******************')

pin = str(input('PLEASE ENTER PIN: '))

print('******************')

print('------------------')

if pin.isdigit():

if user == 'user1':

if pin == pins[0]:

break

else:

count += 1

print('-----------')

print('***********')

print('INVALID PIN')

print('***********')

print('-----------')

print()
if user == 'user2':

if pin == pins[1]:

break

else:

count += 1

print('-----------')

print('***********')

print('INVALID PIN')

print('***********')

print('-----------')

print()

if user == 'user3':

if pin == pins[2]:

break

else:

count += 1

print('-----------')

print('***********')

print('INVALID PIN')

print('***********')

print('-----------')

print()
else:

print('------------------------')

print('************************')

print('PIN CONSISTS OF 4 DIGITS')

print('************************')

print('------------------------')

count += 1

# in case of a valid pin- continuing, or exiting

if count == 3:

print('-----------------------------------')

print('***********************************')

print('3 UNSUCCESFUL PIN ATTEMPTS, EXITING')

print('!!!!!YOUR CARD HAS BEEN LOCKED!!!!!')

print('***********************************')

print('-----------------------------------')

exit()

print('-------------------------')

print('*************************')

print('LOGIN SUCCESFUL, CONTINUE')

print('*************************')

print('-------------------------')

print()
print('--------------------------')

print('**************************')

print(str.capitalize(users[n]), 'welcome to ATM')

print('**************************')

print('----------ATM SYSTEM-----------')

# Main menu

while True:

#os.system('clear')

print('-------------------------------')

print('*******************************')

response = input('SELECT FROM FOLLOWING OPTIONS: \nStatement__(S)


\nWithdraw___(W) \nLodgement__(L) \nChange PIN_(P) \nQuit_______(Q) \n:
').lower()

print('*******************************')

print('-------------------------------')

valid_responses = ['s', 'w', 'l', 'p', 'q']

response = response.lower()

if response == 's':

print('---------------------------------------------')

print('*********************************************')

print(str.capitalize(users[n]), 'YOU HAVE ', amounts[n],'EURO ON


YOUR ACCOUNT.')

print('*********************************************')

print('---------------------------------------------')
elif response == 'w':

print('---------------------------------------------')

print('*********************************************')

cash_out = int(input('ENTER AMOUNT YOU WOULD LIKE TO


WITHDRAW: '))

print('*********************************************')

print('---------------------------------------------')

if cash_out%10 != 0:

print('------------------------------------------------------')

print('******************************************************')

print('AMOUNT YOU WANT TO WITHDRAW MUST TO


MATCH 10 EURO NOTES')

print('******************************************************')

print('------------------------------------------------------')

elif cash_out > amounts[n]:

print('-----------------------------')

print('*****************************')

print('YOU HAVE INSUFFICIENT BALANCE')

print('*****************************')

print('-----------------------------')

else:

amounts[n] = amounts[n] - cash_out

print('-----------------------------------')
print('***********************************')

print('YOUR NEW BALANCE IS: ', amounts[n], 'EURO')

print('***********************************')

print('-----------------------------------')

elif response == 'l':

print()

print('---------------------------------------------')

print('*********************************************')

cash_in = int(input('ENTER AMOUNT YOU WANT TO LODGE: '))

print('*********************************************')

print('---------------------------------------------')

print()

if cash_in%10 != 0:

print('----------------------------------------------------')

print('****************************************************')

print('AMOUNT YOU WANT TO LODGE MUST TO MATCH 10


EURO NOTES')

print('****************************************************')

print('----------------------------------------------------')

else:

amounts[n] = amounts[n] + cash_in

print('----------------------------------------')
print('****************************************')

print('YOUR NEW BALANCE IS: ', amounts[n], 'EURO')

print('****************************************')

print('----------------------------------------')

elif response == 'p':

print('-----------------------------')

print('*****************************')

new_pin = str(input('ENTER A NEW PIN: '))

print('*****************************')

print('-----------------------------')

if new_pin.isdigit() and new_pin != pins[n] and len(new_pin) == 4:

print('------------------')

print('******************')

new_ppin = str(input('CONFIRM NEW PIN: '))

print('*******************')

print('-------------------')

if new_ppin != new_pin:

print('------------')

print('************')

print('PIN MISMATCH')

print('************')

print('------------')

else:

pins[n] = new_pin
print('NEW PIN SAVED')

else:

print('-------------------------------------')

print('*************************************')

print(' NEW PIN MUST CONSIST OF 4 DIGITS \nAND MUST


BE DIFFERENT TO PREVIOUS PIN')

print('*************************************')

print('-------------------------------------')

elif response == 'q':

exit()

else:

print('------------------')

print('******************')

print('RESPONSE NOT VALID')

print('******************')

print('------------------')
RESULT:

The following is the final output

1. Enter the correct user name and password to login


2. Lodgement:

3. Statement:
4. Withdrawal:

5. PIN Change:
6. Quit:
CONCLUSION:

The main complaint heard about ATM machines is that while they are convenient,
they are expensive to use.

However, if we look at it from a banking perspective, business is business.


Regardless of what we think of ATM machines, there is no doubt that they have
changed the world and the way in which we do things. For example, think how
many times we have been out somewhere only to discover we have no cash and we
are out of checks, ah, but in the corner, there is an ATM machine.

In the blink of an eye, we swipe the card and now have cash on hand. In addition
to pulling money out, the ATM machine also makes it convenient to deposit
money. transfer money, and check balances. Best of all, to use an ATM machine,
we do not have to go to the bank.

We will find ATM machines at other banks, grocery stores, shopping malls, along
the roadside.

You might also like