0% found this document useful (0 votes)
64 views24 pages

N+1th Copy of Computer Project

Uploaded by

ezesadumus123
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
64 views24 pages

N+1th Copy of Computer Project

Uploaded by

ezesadumus123
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 24

SREE NARAYANA VIDYA MANDIR SERIOR

SECONDARY SCHOOL
Talap, Kannur-670 002

COMPUTER SCIENCE
PROJECT REPORT

Certified that this project is the bonafide project report of


Mr/Ms of ……………………………….standard XIIB with
Register Number…………............……for the year 2024-2025.

Teacher-in-charge

Valued at the board examination

Examiners

1. ………………………...….….
Principal
2. ………………………...….….

Date……………………

1
ATM
MANAGEMENT
SYSTEM

2
PROJECT
MEMBERS
1. ABHIJITH KUMAR POLA
2. ABHINAV KAPPADAN

3
ACKNOWLEDGEMENT
I would like to express my sincere gratitude and thanks towards
Mrs.Smitha Srinivasan, the Principal and Mrs.Deepika Jaidas ,
the Educational Officer of Sree Narayana Vidya Mandir, for the
guidance and encouragement throughout my course and at the
time of my project.

I am extremely grateful to Ms.Vipina, Teacher, Department of


Computer Science for her sincere and timely help and
corporation during all the phases of my project.

I express my deepest gratitude and sincere thanks to


Ms.Thushara Teacher, Department of Computer Science for her
valuable guidance throughout the project.

Special mentions have to be made of Ms.Vineetha and


Ms.Simna ,Ms. Vinduja, Teachers, Department of Computer
Science for all their support and help rendered towards the
fulfillment of the project.

Finally, but not the least, I would like to express my sincere


gratitude towards my family members for all the help they given
to me and also towards my friends for their support in the
successful completion of the project.

4
CONTENTS
1. INTRODUCTION

2. WORKING ENVIRONMENT

3. SYSTEM ANALYSIS

4. SOURCE CODE

5. INPUT AND OUTPUT

6. CONCLUSION

7. BIBLIOGRAPHY

5
INTRODUCTION
The project entitled ATM MANAGEMENT is developed using MySQL DBMS
and Python connectivity using “mysql.connector” module.

Python is a flexible, portable, easy to modifiable and platform –independent


language.so we are integrating MySQL with Python interface for executing any
database applications. The input is fetched from the user using Python interface
termed as the Front End Interface of the application. An application usually
stores a lot of data in the form of a database permanently are called Back End
Database.

The main objective of the application is to automate and better manage the
existing account details,making it reliable and efficient.

The aim of creating an ATM database with MySQL and Python connectivity is
to develop a secure and efficient system for managing user accounts and
transactions, enabling real-time updates on balances, facilitating user
authentication, and generating reports for analysis. This system aims to enhance
user experience while ensuring data integrity and security in financial operations.
The important modules and functions used in the project are:
· Time
· Date time
· MySQL.connector
· Random
· Admin functions:
· Create
· Update
· Delete
·Search
· Transaction details
User functions

6
WORKING
ENVIRONMENT
Software
Platform : Windows 10
Languages : Python , MYSQL

HARDWARE

Processor : Intel Celeron

Clock speed : 333 MHz

Ram : 4GB

Hard disk capacity : 80 GB

Bit specifcation : 64 Bits

Keyboard : Lenovo keys

Mouse : hpOptical

Display device : Lenovo TFT

7
SYSTEM ANALYSIS
Existing system

In the existing system, many of the operations are done manually.


Manual system consumes lot of time and is quite inefficient. As the
operations are done manually there are chances for clerical errors also.

Drawbacks

Difficulty in maintaining records


Difficulty in searching for the account and transaction details
Huge space consumption.
Limited scalability
Manual functions

Proposed system

In the proposed system, we try to overcome all these issues of the existing
system. This system is more users friendly and is easy to handle even for a
novice user. As the code is flexible and effective, it is easy to enhance
according to the customer requirement.

Advantages

Very fast and accurate.


No need of any extra manual effort.
No fever of data loss.
Just need a little knowledge to operate the system.
Doesn’t require any extra hardware device.
At last very easy to find the employees

8
Mysql Table Structure
The MySQL table used for storing account details in this
project are

Name of the Database: ATM

1. Table1- CUSTOMERDETAILS

2. Table2- TRANSACTIONS

9
SOURCE CODE:
import mysql.connector as m
import time as t
import datetime
import random
def creation():
con=m.connect(host="localhost",user="root",password="code")
cur=con.cursor()
cur.execute("create database ATM;")
cur.execute("use ATM;")
cur.execute("Create table if not exists customerdetails(ACCOUNTNO
varchar(20),PHONENO varchar(15),CNAME varchar(20),ADDRESS
varchar(100),CURRENTBALANCE float(11,2),PASSWD int(4));")
cur.execute("insert into customerdetails values('1803040332','7356610279',
'Admin','SNVM,Thalap,Kannur',5000000,2255);")
cur.execute("create table if not exists transactions(SN int(10) primary
key,ACCOUNTNO varchar(10),ACTIVITY varchar(100));")
con.commit()
cur.close()
con.close()

def curbal(puseraccountno):
con=m.connect(host="localhost",user="root",password="code",database=
"ATM")
cur=con.cursor()
cur.execute("select currentbalance from customerdetails where ACCOUNTNO='
{}' ;".format(puseraccountno,))
rec=cur.fetchone()
print("CURRENT BALANCE: ",rec[0])
con.commit()
cur.close()
con.close()

10
def delete(accno):
con=m.connect(host="localhost",user="root",password="code",database
="ATM")
cur=con.cursor()
cur.execute("delete from transactions where ACCOUNTNO='{}'; ".format
(accno,))
cur.execute("delete from customerdetails where ACCOUNTNO='{}';".format
(accno,))
con.commit()
cur.close()
con.close()

def update(accno):
con=m.connect(host="localhost",user="root",password="code",database=
"ATM")
cur=con.cursor()
repeat="y"
while repeat.lower()=="y":
print("1:CHANGE NAME","2:CHANGE PHONE NUMBER","3:CHANGE
ADDRESS","4:CHANGE PASSWORD")
choice=int(input("Enter choice"))
if choice==1:
name=input("ENTER NEW NAME:")
cur.execute("update customerdetails set CNAME='{}' where ACCOUNTNO
='{}';".format(name,accno))
elif choice==2:
ph=input("ENTER NEW PHONE NUMBER:")
cur.execute("update customerdetails set PHONENO='{}' where
ACCOUNTNO='{}';".format(ph,accno))
elif choice==3:
ad=input("ENTER NEW ADDRESS:")
cur.execute("update customerdetails set ADDRESS='{}' where
ACCOUNTNO='{}';".format(ad,accno))
elif choice==4:
ps=int(input("ENTER NEW PASSWORD:"))
cur.execute("update customerdetails set PASSWD={} whereACCOUNTNO
='{}';".format(ps,accno))
11
else:
print("Invalid Choice")
con.commit()
repeat=input("WANT TO UPDATE MORE?")
cur.close()
con.close()
def create():

con=m.connect(host="localhost",user="root",password="code",database="ATM")
cur=con.cursor()
repeat="y"
while repeat.lower()=="y":
name=input("Enter Customer Name:")
while True:
a=random.randint(1000000000,9999999999)
cur.execute("Select ACCOUNTNO from customerdetails;")
alac=cur.fetchall()
if (a,) not in alac:
acn=str(a)
break
else:
continue
ph=int(input("Enter customer phone number:"))
add=input("Enter customer address:")
cb=float(input("Enter current balance:"))
while True:
u=random.randint(1000,9999)
cur.execute("Select PASSWD from customerdetails;")
alpw=cur.fetchall()
if (u,) not in alpw:
pwd=u
break
else:
continue
cur.execute("insert into customerdetails values('{}',{},'{}','{}',{},{});".format
(acn,ph,name,add,cb,pwd))
con.commit()
12
print("SUCCESSFUL")
repeat=input("Do you want to add more customer?")
cur.close()
con.close()

def search(accno):
con=m.connect(host="localhost",user="root",password="code",database=
"ATM")
cur=con.cursor()
cur.execute("SELECT * from customerdetails where ACCOUNTNO={};"
.format(accno,))
record=cur.fetchall()
print("ACCOUNT NO ","PHONE NUMBER ","NAME
","ADDRESS ","CURRENT BALANCE ",
"PASSWORD ")
for i in record:
a=len(i[2])
b=len(i[3])
print(i[0]," ",i[1]," ",i[2]," "*(19-a),i[3]," "*(33-b),i[4]," ",i[5])
con.commit()
cur.close()
con.close()

def withdraw(puseraccountno):
con=m.connect(host="localhost",user="root",password="code",database=
"ATM")
cur=con.cursor()
while True:
amt=int(input("Enter the money to withdraw:"))
a="select currentbalance from customerdetails where ACCOUNTNO='{}';".
format(puseraccountno,)
cur.execute(a)
f=cur.fetchone()
if amt>f[0]:
print('NO sufficient balance')
print("Please try again")
continue
13
else:
p="update customerdetails set currentbalance=currentbalance-{} where
ACCOUNTNO='{}';".format(amt,puseraccountno)
time=datetime.datetime.now()
a="withdrawn"+str(amt)+","+str(time)
cur.execute(p)
cur.execute("Select* from transactions;")
rec=cur.fetchall()
if rec==[]:
q="insert into transactions values(1,{},'{}');".format(puseraccountno,a)
cur.execute(q)
else:
cur.execute("Select SN from transactions order by SN desc limit 1;")
c=cur.fetchone()
q="insert into transactions values({}, {},'{}');".format
(c[0]+1,puseraccountno,a)
cur.execute(q)
con.commit()
print("Withdrawing..please wait..")
t.sleep(5)
print("Sucessfully withdrawn")
break
con.commit()
cur.close()
con.close()
def deposit(puseraccountno):
con=m.connect(host="localhost",user="root",password="code",database=
"ATM")
cur=con.cursor()
while True:
amt=int(input("Enter the amount to be deposited:"))
if amt>0:
r="update customerdetails set currentbalance=currentbalance + {} where
ACCOUNTNO='{}';".format(amt,puseraccountno)
cur.execute(r)
time=datetime.datetime.now()
a="deposited"+str(amt)+","+str(time)
cur.execute("Select* from transactions;") 14
rec=cur.fetchall()
if rec==[]:
q="insert into transactions values(1,{},'{}');;".format(puseraccountno,a)
cur.execute(q)
else:
cur.execute("Select SN from transactions order by SN desc limit 1;")
c=cur.fetchone()
q="insert into transactions values({},{},'{}');".format(c[0]+1,
puseraccountno,a)
cur.execute(q)
con.commit()
print("Loading...please wait..")
t.sleep(3)
print("Sucessfully deposited")
break
else:
print("INVALID AMOUNT")
print("Try Again")
continue
con.commit()
cur.close()
con.close()

def transactions(puseraccountno):
con=m.connect(host="localhost",user="root",password="code",database=
"ATM")
cur=con.cursor()
cur.execute("select activity from customerdetails c,transactions t where
c.ACCOUNTNO=t.ACCOUNTNO and c.ACCOUNTNO='{}';"
.format(puseraccountno,))
data=cur.fetchall()
print("------------------------------")
for i in data:
print(i[0])
print("------------------------------")
con.commit()
cur.close()
con.close() 15
def using():
try:
con=m.connect(host="localhost",user="root",password="code",database=
"ATM")
cur=con.cursor()
print("***************WELCOME***************")
puseraccountno=input("Enter ACCOUNT number:")
cur.execute("select CNAME,PASSWD from customerdetails where
ACCOUNTNO='{}'".format(puseraccountno,))
data=cur.fetchone()
if data==None:
print("USER DOES NOT EXIST")
elif data[0]=="Admin":
print("Enter Password,ONLY 3 ATTEMPS")
c=0
for n in range(0,4):
if n==0:
passwd=int(input("PASSWORD:"))
if passwd==data[1]:
break
else:
continue
elif n==1:
print("INCORRECT PASSWORD,Enter Password,ONLY 2
ATTEMPS LEFT")
passwd=int(input("PASSWORD:"))
if passwd==data[1]:
break
else:
continue
elif n==2:
print("INCORRECT PASSWORD,Enter Password,ONLY 1
ATTEMPT LEFT")
passwd=int(input("PASSWORD:"))
if passwd==data[1]:
break
else:
continue 16
else:
print("CARD BLOCKED DUE TO REPEATED INCORRECT
VALUE, VISIT THE NEAREST BRANCH TO UNBLOCK",
"THANK YOU",sep="\n")
c+=1
if c==0:
ch="y"
print("Welcome Administrator")
while ch.lower()=="y":
print("MENU","1:ADD NEW CUSTOMER","2:TO CHECK
CUSTOMER DETAILS","3:UPDATE CUSTOMER
DETAILS","4:DELETE CUSTOMER ACCOUNT",sep="\n")
choice=int(input("ENTER CHOICE"))
if choice==1:
create()
elif choice==2:
accno=input("Enter the ACCOUNTNO to search:")
search(accno)
elif choice==3:
accno=input("Enter the ACCOUNTNO to update details:")
update(accno)
elif choice==4:
accno=input("Enter the ACCOUNTNO to delete data:")
delete(accno)
else:
print("INVALID CHOICE")
ch=input("DO you want to perform more actions?")
else:
if data==[]:
print("ACCOUNT DOES NOT EXIST")
else:
print("Enter Password,ONLY 3 ATTEMPS")
c=0
for n in range(0,4):
if n==0:
passwd=int(input("PASSWORD:"))
if passwd==data[1]:
break 17
else:
continue
elif n==1:
print("INCORRECT PASSWORD,Enter Password,ONLY 2
ATTEMPS LEFT")
passwd=int(input("PASSWORD:"))
if passwd==data[1]:
break
else:
continue
elif n==2:
print("INCORRECT PASSWORD,Enter Password,ONLY 1
ATTEMP LEFT")
passwd=int(input("PASSWORD:"))
if passwd==data[1]:
break
else:
continue
elif n==3:
print("CARD BLOCKED DUE TO REPEATED INCORRECT
PASSWORD, VISIT THE NEAREST BRANCH TO
UNBLOCK")
c+=1
if c==0:
ch="y"
while ch.lower()=="y":
print("MENU","1:WITHDRAW","2:DEPOSIT","3:VIEW
TRANSACTIONS","4:VIEW CURRENTBALANCE",sep='\n')
choice=int(input("Enter choice"))
if choice==1:
withdraw(puseraccountno)
elif choice==2:
deposit(puseraccountno)
elif choice==3:
transactions(puseraccountno)
elif choice==4:
curbal(puseraccountno)
18
else:
print("INVALID CHOICE")
ch=input("Want to perform more transactions?:")
except Exception as e:
print(e)
#main
while True:
try:
creation()
print("SUCCESS")
except:
break
l=list("LOADING...")
for i in l:
print(i,end="")
t.sleep(0.04)
print("\n")
using()

19
INPUT AND OUTPUT

20
21
22
CONCLUSION
In this project, we explored the integration of MySQL with Python to
create a functional ATM system. By leveraging the capabilities of
MySQL for data management and Python for application logic, we
successfully developed a secure and efficient interface for users to
perform banking transactions.
Key takeaways from this project include:

Database Management: MySQL effectively handled user data and


transaction records, ensuring data integrity and reliability.

User friendly: The whole project is being menu driven makes it user
friendly, it displays required messages wherever necessary.

Reliability: Software reliability is also defined as the probability that a


software system fulfills its assigned task in a given environment for a
predefined number of input cases, assuming that the hardware and the
input are free of error.Software reliability concerns with how the
program works in different solutions.

Scalability: The system's architecture is designed to accommodate


future enhancements, such as adding more features or integrating with
online banking services.

Overall, this project shows how effective it is to use Python with


MySQL for building a strong atm banking solution. Future
improvements could include adding more features, enhancing user
interfaces, and increasing security. We gained important insights into
database management, application development, and secure coding
practices

23
BIBLIOGRAPHY

Computer Science With Python – Preethi Arora

www.google.com

www.wikipedia.com/Python

Class Notes

24

You might also like