Bharat Software Atm Manager Report
Bharat Software Atm Manager Report
Bharat Software Atm Manager Report
3. Python Coding.
5. References.
Introduction of the Project
We the students of CLASS XII A of KENDRIYA VIDYALAYA
PALAMPUR HOLTA have been assigned the work of “BHARAT
SOFTWARE - ATM MANAGER ”.
To perform this task the students were divided into the group of
four students named as ADVITIYA, AKSHIT, SHUBHAM.
We are so glad that this work have been assigned to us, yet we
haven’t done this work before SH. SANJEEV SHARMA our
subject teacher have also helped us a lot to complete this project.
We feel so blessed that we have learnt all this work with the help
of our sir,we are also thankful to our respected principal SH.
LALIT KUMAR GUPTA for providing us various facilities to
complete this project.
PROCESS
PYTHON CODING
#*****************KENDRIYA VIDYALYA PALAMPUR******************"
import mysql.connector
# GLOBAL VARIABLES DECLARATION
userName="" password
=""
cid=""
MYSQLconnectionCheck ():
global myConnection
password
myConnection=mysql.connector.connect(host="localhost",user=userName,passwd=password ,
auth_plugin='mysql_native_password' ) if myConnection:
cursor=myConnection.cursor()
cursor.execute("COMMIT")
cursor.close()
return myConnection
else:
MYSQLconnection ():
global userName
myConnection
myConnection=mysql.connector.connect(host="localhost",user=userName,passwd=password ,
database="ATM" , auth_plugin='mysql_native_password' )
if myConnection:
return myConnection
else:
myConnection.close()
def newCustomer():
global cid
if myConnection:
cursor=myConnection.cursor()
createTable ="""CREATE TABLE IF NOT EXISTS CUSTOMER(CID VARCHAR(10) PRIMARY KEY ,CNAME
VARCHAR(30) NOT NULL
"""
values=(cid,cname,address,phone) cursor.execute(sql,values)
cursor.execute("COMMIT")
cursor.close()
def displayAllCustomer():
if myConnection:
cursor=myConnection.cursor()
data = cursor.fetchall()
if data:
print(data)
else:
else:
searchCustomer():
global cid if
myConnection:
cursor=myConnection.cursor()
values=(cid,)
data=cursor.execute(sql,values)
data = cursor.fetchall()
if data:
print("\n*****CUSTOMER DETAILS*****")
print(data)
else:
else:
print("\nSomthing Went Wrong ,Please Try Again !")
def newAccount():
global cid
if myConnection:
cursor=myConnection.cursor()
values=(cid,)
data=cursor.execute(sql,values)
data = cursor.fetchall()
if data:
,ACCOUNT_TYPE VARCHAR(20) NOT NULL ,AMOUNT INT NOT NULL , PIN INT NOT NULL
UNIQUE)
"""
cursor.execute(createTable)
values1=(cid,account_no,account_type,amount,ATM_pin)
cursor.execute(sql,values1)
cursor.execute("COMMIT") print("\nNew
else:
def displayAllAccounts():
if myConnection:
cursor=myConnection.cursor()
data = cursor.fetchall()
if data:
print(data)
else:
else:
searchAccount():
global cid if
myConnection:
ACCOUNT_NO =%s"
values=(cid,account_no)
data=cursor.execute(sql,values)
print(data)
else:
else:
withdrawAmount():
count =3 if
myConnection:
cursor=myConnec
tion.cursor()
account_no=int(in
put("PLEASE
ENTER THE
ACCOUNT
sql="SELECT *
FROM ACCOUNT
WHERE
ACCOUNT_NO =
%s"
values=(account_no,)
data=cursor.execute(sql,values)
while True:
ATM_PIN=int(input("PLEASE ENTER THE ATM PIN - ONLY 3 ATTEMPTS ARE ALLOWED : "))
values=(ATM_PIN,)
cursor.execute(sql,values) data
= cursor.fetchall()
if data:
break
else:
print("Your Card has been Blocked , Please Visit the Branch to activate it")
break
else:
helpMe():
print("Please, Visit The Offcial Website Of Vidyalaya To Download The Mannual !!!")
# MAIN SCREEN
20]")
myConnection = MYSQLconnectionCheck ()
if myConnection: MYSQLconnection ()
while(1):
print("\n!=========================*************=======================!")
print("\n!============================*****END*****====================!")
displayAllCustomer()
elif choice == 3:
searchCustomer()
elif choice == 4:
newAccount() elif
choice==5:
displayAllAccounts()
elif choice==6:
searchAccount() elif
choice==7:
withdrawAmount()
elif choice==8:
break elif
choice==0:
helpMe() else:
print("Sorry ,May Be You Are Giving Me Wrong Input, Please Try Again !!! ") else:
#(":::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::")
#(" T H H A A N N N K K ")
#(" T H H A AN NK K Y O O U U ")
#(" Y O O U U ")
#(":::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::")
MAIN SCREEN
STARTING OF SOFTWARE
FOR NEW USER
DISPLAY CUSTOMER DETAILS
TO SEARCH A CUSTOMER
TO OPEN NEW ACCOUNT
TO DISPLAY ALL ACCOUNTS
TO SEARCH AN ACCOUNT
TO WITHDRAW AMOUNT
BLOCKED PIN
TO EXIT
FOR HELP
DATABASE - ATM
TABLE STRUCTURE 1
TABLE STRUCTURE 2
BACKEND DATA GENERATED THROUGH
SOFTWARE
BACKEND DATA GENERATED THROUGH
SOFTWARE
References
1. python.org
2. Code Academy
3. tutorialsPoint.com
4. PythonChallenge.com
6. LearnPython.org
7. layak.in