Computer P3roject Python PDF
Computer P3roject Python PDF
COmputer PROJECT
TOPIC – ATM Program In
Python .
SUBMITTED TO:
Ms. Nimisha
Shylesh(hod)
Computer Sc.
Certificate
Name: Romil, Tushar, Mudit Class: XII Sc.
Roll No.
Institution - Hind Zinc School
…………….
Teacher In-charge
……………….. ……………….
Examiner’s Signature Principal
Date:………..
Institution Rubber Stamp
ACKNOWLEDGEMENT
Roll No.
i Introduction 5
II Program 6
III Outputs 28
INTRODUCTION
Program - ATM
if user in users:
#Checking the existance to
users in the bank.
if user ==
users[0]:
n = 0
#for name of
user according to index position
of the list users,
#Here at the
0th index there is ROMIL int he
list users.
elif user ==
users[1]:
n = 1
#n=1 is for second
user i.e. at the 1st index of list
users (TUSHAR).
else:
#esle condition
for the last user.
#since here are
only 3 user thats why n=2 i.e. at
second index of
list users the element named is
MUDIT.
n = 2
break
else:
print("-----------
-----")
print("|INVALID
USERNAME|")
print("-----------
-----")
# comparing pin.
print("|------------------
|")
pin =
str(getpass.getpass("|PLEASE ENTER
PIN|: "))
#to enter the pin
print("|------------------
|")
if pin.isdigit():
if user == "romil":
#checking
for a pirticular user named romil.
if pin ==
pins[0]:
#If the pin
@ 0th index matches the enetred
pin then then
#condition
comes out to be true and the loop
breaks.
break
else:
#And if the
entered pin not matches with the
users pin then
this condition get executed.
count += 1
print("|-----------|")
print("|INVALID PIN|")
print("|-----------|")
print()
if user == "mudit":
#checking for a
pirticular user named mudit.
if pin ==
pins[1]:
break
else:
#And if
the entered pin not matches with
the users pin then this condition
get executed.
count += 1
print("|-----------|")
print("|INVALID PIN|")
print("|-----------|")
print()
if user ==
"tushar":
#checking for a
pirticular user named mudit.
if pin ==
pins[2]:
break
else:
#And if
the entered pin not matches with
the users pin then this condition
get executed.
count += 1
print("|-----------|")
print("|INVALID PIN|")
print("|-----------|")
print()
else:
print("|----------
--------------|")
print("|PIN
CONSISTS OF 4 DIGITS|")
print("|----------
--------------|")
count += 1
#In case the user input
more the 4 digit of pin.
print("|--------------------------
---|")
print("| |/\|ACCESS GARNTED|/\|
|")
print("|--------------------------
---|")
print(" ||LOGGED IN
SUCESSFUYLL|| ")
print("|--------------------------
---|")
print("|__________________________
___|")
print(str.capitalize(users[n]),
"~Welcome to ATM~\n\t [:)(:]")
print("|__________ATM
SYSTEM__________|\n\t ~By-
RMT~")
# Main menu
while True:
#os.system("clear")
print("|__________________________
_____|")
response = input("|SELECT
FROM FOLLOWING OPTIONS|:
\n|Statement--(S)| \n|Withdraw--
(W)| \n|Lodgement--(L)|
\n|Change PIN_(P)| \n||Quit--
(Q)|| \n: ").lower()
#To display all the
related options.
print("|------------------
-------------|")
valid_responses = ["s",
"w", "l", "p", "q"]
#List of all the valid
responses.
response = response.lower()
#to convert the letters to
lower case if entered in upper
case.
if response == "s":
print("|----------
----------------------------------
-|")
print(str.capitalize(users[n]),
"|YOU HAVE ", amounts[n],"RUPEES
ON YOUR ACCOUNT.|")
print("|----------
----------------------------------
-|")
cash_out =
int(input("|ENTER AMOUNT OF RUPEES
YOU WOULD LIKE TO WITHDRAW|: "))
print("|----------
----------------------------------
-|")
if cash_out%10 !=
0:
print("|AMOUNT
YOU WANT TO WITHDRAW MUST
TO MATCH 100 RUPEES
NOTES|")
print("|--
----------------------------------
------------------|")
elif cash_out >
amounts[n]:
print("|
====================== |")
print("|--
----------------|")
print("")
new_ppin =
str(getpass.getpass("|CONFIRM NEW
PIN|: "))
print("")
print("|--
-----------------|")
if
new_ppin != new_pin:
print("|-----------------|")
print("~~~~~~~~~~~~~~~~~~~")
print("|PIN MISMATCHED!!!|")
print("~~~~~~~~~~~~~~~~~~~")
print("|-----------------|")
else:
pins[n] = new_pin
print("~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~")
print("
|NEW PIN MUST CONSIST OF 4 DIGITS
\nAND MUST BE DIFFERENT TO
PREVIOUS PIN|")
print("~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~")
elif response == "q":
exit()
else:
print("|----------
--------|")
print("|RESPONSE
NOT VALID|")
print("|----------
--------|")
Outputs
Logging in :
Lodgement and Pin change:
.
Statement and Withdrawing:
BIBILOGRAPHY
https://www.google.co.in/
https://sourceforge.net/projects/pyinvoice/
files/latest/
https://www.academia.edu/reset_confirmation