Computer Science1

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 51

COMPUTER SCIENCE

INVESTIGATORY PROJECT
COMPUTER
SCIENCE
INVESTIGATORY
PROJECT
2022-23
TOPIC: BANKING
MANAGEMENT

D.A.V. PUBLIC SCHOOL, NEW


PANVEL
DONE BY:
SANWARIYA MANKAR
CLASS: XII A
ROLL NO:

INDEX

CONTENT PAGE NO.


Acknowledgement 1

Certificate 2

Introduction 3

Requirements 4

Modules 5

Code 15

Output 39

Conclusion 43

Analysis 44

Bibliography 45
Teacher’s remarks 46

ACKNOWLEDGEMENT
I would like to acknowledge the support and
help that was provided by my teachers and
friends for helping me to complete the given
project within the stipulated time.
I would like to thank our respected Principal,
Mr. Chaitanya Chilamkuri Sir for his mutual
support. I would also like to express my
gratitude to my computer science teacher
Mrs. Neelu Raina madam for giving me the
golden opportunity to work on the wonderful
computer science project. Finally I would like
to thank CBSE for giving me this opportunity
to undertake this project.
CERTIFICATE
EXAMINATION ROLL NO:
This is to certify that Mst Sanwariya Mankar of
Class XII-A has satisfactorily completed his
computer science project work on the topic
BANKING MANAGEMENT, for AISSCE as
prescribed by CBSE for the year 2022-2023.
Date: _____________

_________________ ________________
Staff member in charge of Signature of the Principal
the batch

__________________ _________________
Rubber stamp of the school Signature of the External
Examiner
INTRODUCTION

This project “Banking Management System” does


work related to ATM (Automatic Teller Machine).
It helps the user to create an account in the bank,
to deposit cash into the bank and to withdraw cash
from the bank. The project also helps to check the
balance also helps the user to change the password
of their account. The user can even delete their
account in the bank. “Banking Management
System” is developed as per seeing the increasing
requirement to speed up the work and incorporate
a new work culture. Thus a new software has been
proposed to reduce manual work, improving work
efficiency, saving time and to provide greater
flexibility and user-friendliness as the system
previously followed was totally manual one with
lots of errors.
REQUIREMENTS

 HARDWARE REQUIRED
o Printer, to print the required documents of
the project
o Compact Drive
o Processor : Pentium III
o Ram : 64 MB
o Hard disk : 20 Gb.

 SOFTWARE REQUIRED
o Operating system : Windows XP
o IDLE(Python 3.6 32-bit), for execution of
program
o Ms word, for presentation of output.
MODULES

Tkinter Module:
Before we proceed, let's define some of the common
terms.
Window:This term has different meanings in
different contexts, but in general it refers to a
rectangular area somewhere on your display screen.
Top-level window:A window that exists independently
on your screen. It will be decorated with the standard
frame and controls for your system's desktop manager.
You can move it around on your desktop. You can
generally resize it, although your application can
prevent this

Widget:The generic term for any of the building blocks


that make up an application in a graphical user interface.
Examples of widgets: buttons, radio buttons, text fields,
frames, and text labels.

Frame:In Tkinter, the Frame widget is the basic unit


of organization for complex layouts. A frame is a
rectangular area that can contain other widgets.

Child, parent:When any widget is created, a parent-


child relationship is created. For example, if you place a
text label inside a frame, the frame is the parent of the
label.
There are two main methods which the user need to

remember while creating the Python application with

GUI.

1. Tk():To create a main window, tkinter offers a


method ‘Tk()’. The basic code used to create the
main window of the application is:
from tkinter import *

master = Tk()
Then title, geometry, resizable properties of the master
window are set.

Title: Text to be displayed in the title bar of the window


Geometry: w x h ± x ± y. The w and h parts give the
window width and height in pixels. They are
separated by the character 'x'. If the next part has the
form +x, it specifies that the left side of the window
should be x pixels from the left side of the desktop. If
it has the form -x, the right side of the window is x
pixels from the right side of the desktop. If the next
part has the form +y, it specifies that the top of the
window should be y pixels below the top of the
desktop. If it has the form -y, the bottom of the
window will be y pixels above the bottom edge of the
desktop.

Resizable(width=value, height=value):If width is


true, allow horizontal resizing. If height is true,
allow vertical resizing.

Withdraw() method hides the window and deiconify()


method restores it.

2. Mainloop():There is a method known by the name


mainloop() which is usedwhen you are ready for the
application to run. mainloop() is an infinite loop
used to run the application, wait for an event (e.g.
clicking a mouse button, moving the mouse cursor,
pressing a key etc.) to occur and process the event
till the window is not closed.

master.mainloop()

tkinter also offers access to the geometric configuration

of the widgets (e.g. label, entry, button, listbox,

scrollbar, canvas, image etc.) which can organize the

widgets in the parent windows. The following geometry

manager methods have been used:

Pack() method: Pack is the easiest geometry managers


of Tk and Tkinter. Instead of having to declare precisely
where a widget should appear on the display screen, we
can declare the positions of widgets with the pack
command relative to each other. The pack command
takes care of the details.

Grid(row=value, column=value, sticky=value)


method:Grid geometry manager places the widgets in a
2-dimensional table, which consists of a number of rows
and columns. The position of a widget is defined by a
row and a column number. Correspondingly, widgets
with the same row number but different column
numbers will be on the same "line" and will be beside of
each other, i.e. to the left or the right. Sticky is a string
that defines how this element is to be positioned within
its parent. This string may contain zero or more of the
characters 'n', 's', 'e', and 'w'. For example, the value
sticky='ns' would stretch this element to adhere to the
north and south sides of the cavity within its parent
element.

There are a number of widgets which you can put in your

tkinter application. Some of the major widgets are

explained below:

Label widget: It refers to the display box where you can


put any text or image which can be updated any time as
per the code. The general syntax is: lbl=Label(master,
text = value) where master is the parameter used to
represent the parent window. The text parameter is set
to the text to be displayed in the label widget. The
configure method of Label widget is used to set font, fg
(foreground colour) of the text.
Button widget:The Button widget is a standard Tkinter
widget, which is used for various kinds of buttons. A
button is a widget which is designed for the user to
interact with, i.e. if the button is pressed by mouse click
some action might be started. They can also contain
text and images like labels. While labels can display text
in various fonts, a button can only display text in a
single font. The text of a button can span

more than one line. A Python function or method can


be associated with a button. This function or method
will be executed, if the button is pressed in some way.
The general syntax is:

w=Button(master, text=value, width=value,


command=value)
where master is the parent window where the button
widget is be placed, text is button text, width is button
width, command is the function or method to be called
when the button is clicked. The configure method of the
button widget can be used set value for font, fg
(foreground colour of the button text)
Entry widget: Entry widgets allow the user to enter a
single line of text. If the use renters a string, which is
longer than the available display space of the widget, the
content will be scrolled. This means that the string
cannot be seen in its entirety. The arrow keys can be
used to move to the invisible parts of the string. The
syntax of an entry widget looks like this:

e = Entry(master, text variable=value, show=value)


where "master" represents the parent window where the
entry widget is to be placed, text variable is assigned to a
control variable and show specifies the character to
appear as the user types. To make a “password” entry that
echoes each character as an asterisk, set show='*'.

The insertion cursor is displayed in the Entry widget


only when the user clicks the mouse somewhere in the
widget. It usually appears as a blinking vertical line
inside the widget. This insertion cursor shows where
new text will be inserted. Positions within the entry
widget's displayed text are given as an index. Index 0
refers to the position before the existing text and the
constant ENDrefers to the position after the existing
text.

Control Variable: In order to be able to retrieve the


current text from entry widget ,text variable must be set
to a control variables. A Tkinter control variable is a
special object that acts like a regular Python variable in
that it is a container for a value, such as a number or
string. One special quality of a control variable is that it
can be shared by a number of different widgets, and the
control variable can remember all the widgets that are
currently sharing it. Normally the text displayed in an
Entry widget is linked to a control variable. There are 4
types of control valiables: StringVar(), IntVar(),
DoubleVar() and BoolVar(). All control variables have
these two methods:

.get()- Returns the current value of the variable.


.set(value)- Changes the current value of the variable.

Frame widget:A frame is basically just a container for


other widgets. Each frame has its own grid layout, so
the gridding of widgets within each frame works
independently.

Frame widgets are a valuable tool in making your

application modular. It is used for grouping and

organizing the widgets. The general syntax is:


w = Frame(master)

Listbox widget: The purpose of a listbox widget is to


display a set of lines of text.
Generally they are intended to allow the user to select
one or more items from a list.
All the lines of text use the same font. The general syntax
is:

Lbox1= Listbox(master, height=value, width=value)

lbox1.config(yscrollcommand=sbar1.set) where
Mysql.Connector Module:

MySQL Connector is a standardized database driver


provided by MySQL to access the MySQL database from
Python. In order to use this module, the mysql
connector is to be downloaded and installed as follows:

C:\Users\Your Name\AppData\Local\Programs\Python\
Python36-32\Scripts>python -m

pip install mysql-connector

import mysql.connector
If the above code is executed with no errors, "MySQL

Connector" is installed and ready to be used.

Mysql.connector.connect() :Aconnection with the


MySQL server can beestablished using either the
mysql.connector.connect() function. The syntax is as
follows:

conn = mysql.connector.connect(host=value, user=value,


password=value, database=value)
where host is the host name or IP address of the MySQL

server, user and password are used to login to the MySQL

server and database is the database name to use when

connecting with the MySQL server.


PROGRAM CODE
from tkinter import * # imported tkinter module
from tkinter import messagebox # imported tkinter messagebox
module
from tkinter import ttk # imported ttk for using combobox

''' ---------- connecting with mysql.connector ------------- '''

import mysql.connector as ms # imported mysql.connector


connection =
ms.connect(host='localhost',user='root',password='tiger',database='at
m')
mycursor = connection.cursor() # created cursor

''' -----------------------------x-------------------------- '''

''' ---------- creating welcome window ------------- '''

welcome_screen = Tk() # created a welcome window


welcome_screen.geometry("1100x700+220+80") # set a geometry for
welcome window
welcome_screen.resizable(0,0) # for not resizing the welcome
window
welcome_screen.title("BANK") # setting the title
welcome_screen.iconbitmap(default="directory\\window_icon\\
window_icon.ico") # setting icon

''' -------------------------x---------------------- '''

''' ------------- importing png images ------------- '''

bank_icon = PhotoImage(file="directory\\png_helper\\bank.png")
#bank directory
dollar_icon = PhotoImage(file="directory\\png_helper\\dollar.png")
#dollar directory
withdraw_icon = PhotoImage(file="directory\\png_helper\\
withdraw.png") #withdraw directory
deposit_icon = PhotoImage(file="directory\\png_helper\\
deposit.png") #deposit directory
check_your_balance_icon = PhotoImage(file="directory\\png_helper\\
check_your_balance.png") #check_your_balance directory
change_your_pin_icon = PhotoImage(file="directory\\png_helper\\
change_your_pin.png") #change_your_pin directory
account_info_icon = PhotoImage(file="directory\\png_helper\\
account_info.png") #account_info directory
username_icon = PhotoImage(file="directory\\png_helper\\
account_info.png") #username directory
password_icon = PhotoImage(file="directory\\png_helper\\
password.png") #password directory
new_icon = PhotoImage(file="directory\\png_helper\\new.png")
#new directory
confirm_icon = PhotoImage(file="directory\\png_helper\\
confirm.png") #confirm directory

window_bg = PhotoImage(file="directory\\window_icon\\
window_b.png") # window_bg directory

''' ------------------------x----------------------- '''

''' --------------- defining functions -------------- '''

global_username = [" "]


menu_im = [" "," "," "," "," "]
menu_btn = [" "," "," "," "," "]

def call_usernames():
mycursor.execute("select user_name from users;")
usernames = mycursor.fetchall()
row = mycursor.rowcount
us_name = []
for i in range(row):
us_name.append(usernames[i][0])
return us_name

def call_password():
query = "select password from users where user_name =
'{}';".format(global_username[0])
mycursor.execute(query)
password = mycursor.fetchone()
password = password[0]
return password

def call_balance():
query = "select balance from users where user_name =
'{}';".format(global_username[0])
mycursor.execute(query)
balance = mycursor.fetchone()
balance = balance[0]
return balance

def call_dob():
query = "select dob from users where user_name =
'{}';".format(global_username[0])
mycursor.execute(query)
dob = mycursor.fetchone()
dob = dob[0]
return dob

def call_gender():
query = "select gender from users where user_name =
'{}';".format(global_username[0])
mycursor.execute(query)
gender = mycursor.fetchone()
gender = gender[0]
return gender

def save_un_ps_ba_dob_gen(password,dob,gen):
if (gen==1):
gender = "MALE"
else:
gender = "FEMALE"
query = "insert into users values('{}','{}',
{},'{}','{}');".format(global_username[0],password,0,dob,gender)
mycursor.execute(query)
mycursor.execute("commit;")

def update_ps(new_ps):
un = global_username[0]
query = "update users set password = '{}' where user_name =
'{}';".format(new_ps,un)
mycursor.execute(query)
mycursor.execute("commit;")

def update_ba(new_ba):
un = global_username[0]
query = "update users set balance = {} where user_name =
'{}';".format(new_ba,un)
mycursor.execute(query)
mycursor.execute("commit;")

def delete_user():
query = "delete from users where user_name =
'{}';".format(global_username[0])
mycursor.execute(query)
mycursor.execute("commit;")

def withdraw_window():
def destroy_all():
# hiding all the previous widgets
window.place_forget() # hiding the main frame
wd_icon.destroy()
wd_text.destroy()
amt_entry.destroy()
confirm_btn.destroy()
submit_btn.destroy()
back_btn.destroy()
def withdraw_function(event=""):
cv = confirm_value.get()
amt = amt_value.get()
current_balance = call_balance()
if (cv==1) and (amt!=""):
amt = int(amt)
if (int(current_balance) == 0):
messagebox.showinfo("Warning","YOU HAVE
BALANCE OF Rs 0 , YOU MUST DEPOSIT SOME AMOUNT
FIRST")
destroy_all()
elif (amt>current_balance):
amt_entry.delete(0,END)
messagebox.showinfo("WARNING","YOU
DON'T HAVE THAT MUCH OF BALANCE TO WITHDRAW")
else:
saving_amt = int(current_balance)-int(amt)
update_ba(saving_amt) # update balance of the
user
amt_entry.delete(0,END)
messagebox.showinfo("WITHDRAWAL
SUCCESSFUL","YOU HAVE WITHDRAWN Rs. "+str(amt))
destroy_all()
elif (amt==""):
messagebox.showinfo("WARNING","PLEASE
ENTER THE AMOUNT TO WITHDRAW")
else :
messagebox.showinfo("WARNING","PLEASE
CLICK TO CONFIRM FOR CONFIRMATION")
window = Frame(width=700,height=500,bg="white")
window.place(x=35,y=130)
icon =
Label(window,bg="white",width=50,height=50,image=withdraw_ico
n)
icon.place(x=15,y=10)
title = Label(window,text=" WITHDRAW CASH
",bg="white",fg="#000066",font="calibri 20")
title.place(x=250,y=20)
wd_icon =
Label(bg="white",width=50,height=50,image=withdraw_icon)
wd_icon.place(x=260,y=293)
wd_text = Label(bg="white",text=" WITHDRAW AMOUNT :
",font="calibri 14",fg="#000066")
wd_text.place(x=320,y=290)
amt_value = StringVar()
amt_entry =
Entry(bg="white",fg="#000066",font="calibri",textvariable=amt_valu
e)
amt_entry.place(x=329,y=320)
confirm_value = IntVar()
confirm_btn = Checkbutton(text=" CONFIRM
",font="calibri",variable=confirm_value,bg="white",fg="#000066")
confirm_btn.place(x=350,y=370)
submit_btn = Button(command=withdraw_function,text="
PROCEED
",font="calibri",fg="white",bg="#000066",border=0,padx=10,pady=5
)
submit_btn.place(x=350,y=420)

back_btn = Button(command=destroy_all,text=" BACK


",font="calibri",fg="white",bg="#000066",border=0,padx=10,pady=5
)
back_btn.place(x=360,y=540)

welcome_screen.bind("<Return>",withdraw_function) # binding
enter key to proceed

def deposit_window():
def destroy_all():
# hiding all the previous widgets
window.place_forget() # hiding the main frame
dp_icon.destroy()
dp_text.destroy()
amt_entry.destroy()
confirm_btn.destroy()
submit_btn.destroy()
back_btn.destroy()
def deposit_function(event=""):
cv = confirm_value.get()
amt = amt_value.get()
current_balance = call_balance()
if (cv==1) and (amt!=""):
saving_amt = int(current_balance)+int(amt)
update_ba(saving_amt)
amt_entry.delete(0,END)
messagebox.showinfo("DEPOSITED
SUCCESSFUL","YOU HAVE DEPOSITED Rs. "+str(amt))
destroy_all()
elif (amt==""):
messagebox.showinfo("WARNING","PLEASE
ENTER THE AMOUNT TO DEPOSIT")
else :
messagebox.showinfo("WARNING","PLEASE
CLICK TO CONFIRM FOR CONFIRMATION")
window = Frame(width=700,height=500,bg="white")
window.place(x=35,y=130)
icon =
Label(window,bg="white",width=50,height=50,image=deposit_icon)
icon.place(x=15,y=10)
title = Label(window,text=" DEPOSIT CASH
",bg="white",fg="#000066",font="calibri 20")
title.place(x=270,y=20)
dp_icon =
Label(bg="white",width=50,height=50,image=deposit_icon)
dp_icon.place(x=260,y=293)
dp_text = Label(bg="white",text=" DEPOSIT AMOUNT :
",font="calibri 14",fg="#000066")
dp_text.place(x=320,y=290)
amt_value = StringVar()
amt_entry =
Entry(bg="white",fg="#000066",font="calibri",textvariable=amt_valu
e)
amt_entry.place(x=329,y=320)
confirm_value = IntVar()
confirm_btn = Checkbutton(text=" CONFIRM
",font="calibri",variable=confirm_value,bg="white",fg="#000066")
confirm_btn.place(x=350,y=370)
submit_btn = Button(command=deposit_function,text="
PROCEED
",font="calibri",fg="white",bg="#000066",border=0,padx=10,pady=5
)
submit_btn.place(x=350,y=420)

back_btn = Button(command=destroy_all,text=" BACK


",font="calibri",fg="white",bg="#000066",border=0,padx=10,pady=5
)
back_btn.place(x=360,y=540)

welcome_screen.bind("<Return>",deposit_function) # binding
enter key to proceed

def check_your_balance_window():
def destroy_all(event=""):
# destroying previous window
window.place_forget()
b_amt.destroy()
back_btn.destroy()
#-------x--------
window = Frame(width=700,height=500,bg="white")
window.place(x=35,y=130)
icon =
Label(window,bg="white",width=50,height=50,image=check_your_b
alance_icon)
icon.place(x=15,y=10)
title = Label(window,text=" CHECK YOUR BALANCE
",bg="white",fg="#000066",font="calibri 20")
title.place(x=220,y=20)
b_amt = Label(text="YOUR CURRENT BALANCE IS Rs.
"+str(call_balance()),font="calibri 20",fg="#000066",bg="white")
b_amt.place(x=200,y=350)

back_btn = Button(command=destroy_all,text=" BACK


",font="calibri",fg="white",bg="#000066",border=0,padx=10,pady=5
)
back_btn.place(x=360,y=420)

welcome_screen.bind("<BackSpace>",destroy_all) # binding
backspace key to destroy_all

def change_your_pin_window():
def destroy_all():
# destroying all previous widgets
window.place_forget()
newps_icon.destroy()
newps_text.destroy()
newps_entry.destroy()
cps_icon.destroy()
cps_text.destroy()
cps_entry.destroy()
confirm_btn.destroy()
submit_btn.destroy()
back_btn.destroy()
# ------x------
def proceed(event=""):
new_ps = newps_value.get()
c_ps = cps_value.get()
c_value = confirm_value.get()
if (new_ps=="" or c_ps==""):
messagebox.showinfo("WARNING","PLEASE FILL
NEW PASSWORD OR CONFIRM PASSWORD")
elif (c_value==0):
messagebox.showinfo("WARNING","PLEASE
CHECK THE CONFIRM BOX")
elif (new_ps!=c_ps):
newps_entry.delete(0,END)
cps_entry.delete(0,END)
messagebox.showinfo("WARNING","YOUR NEW
PASSWORD AND CONFIRM PASSWORD DOES NOT MATCH")
elif (len(new_ps) <= 4):
newps_entry.delete(0,END)
cps_entry.delete(0,END)
messagebox.showinfo("WARNING","YOUR NEW
PASSWORD IS TOO SHORT")
else:
update_ps(new_ps)
newps_entry.delete(0,END)
cps_entry.delete(0,END)
messagebox.showinfo("SUCCESSFULY
PROCEEDED","YOUR PASSWORD IS CHANGED
SUCCESSFULY")
destroy_all()
window = Frame(width=700,height=500,bg="white")
window.place(x=35,y=130)
icon =
Label(window,bg="white",width=50,height=50,image=change_your_
pin_icon)
icon.place(x=15,y=10)
title = Label(window,text=" CHANGE YOUR PIN
",bg="white",fg="#000066",font="calibri 20")
title.place(x=250,y=20)
newps_icon =
Label(bg="white",width=50,height=50,image=new_icon)
newps_icon.place(x=260,y=274)
newps_text = Label(bg="white",text=" NEW PASSWORD :
",font="calibri 14",fg="#000066")
newps_text.place(x=320,y=270)
newps_value = StringVar()
newps_entry =
Entry(bg="white",fg="#000066",font="calibri",textvariable=newps_v
alue,show="X")
newps_entry.place(x=329,y=300)
cps_icon =
Label(bg="white",width=50,height=50,image=confirm_icon)
cps_icon.place(x=260,y=364)
cps_text = Label(bg="white",text="CONFIRM
PASSWORD :",font="calibri 14",fg="#000066")
cps_text.place(x=320,y=360)
cps_value = StringVar()
cps_entry =
Entry(bg="white",fg="#000066",font="calibri",textvariable=cps_valu
e,show="X")
cps_entry.place(x=329,y=390)
confirm_value = IntVar()
confirm_btn = Checkbutton(text=" CONFIRM
",font="calibri",variable=confirm_value,bg="white",fg="#000066")
confirm_btn.place(x=350,y=430)
submit_btn = Button(command=proceed,text=" PROCEED
",font="calibri",fg="white",bg="#000066",border=0,padx=10,pady=5
)
submit_btn.place(x=350,y=470)

back_btn = Button(command=destroy_all,text=" BACK


",font="calibri",fg="white",bg="#000066",border=0,padx=10,pady=5
)
back_btn.place(x=360,y=540)

welcome_screen.bind("<Return>",proceed) # binding enter key


to proceed

def account_info_window():
def destroy_all():
# destroying all the previous window
window.place_forget()
confirm_btn.destroy()
delete_btn.destroy()
back_btn.destroy()
menu_im[0].destroy()
menu_im[1].destroy()
menu_im[2].destroy()
menu_im[3].destroy()
menu_im[4].destroy()
menu_btn[0].destroy()
menu_btn[1].destroy()
menu_btn[2].destroy()
menu_btn[3].destroy()
menu_btn[4].destroy()
creating_verifying_form()
#-------x-------
def back(event=""):
# destroying all the previous window
window.place_forget()
confirm_btn.destroy()
delete_btn.destroy()
back_btn.destroy()
#-------x-------
def delete_my_acc(event=""):
c_v = confirm_value.get()
if (c_v==1):
delete_user()
messagebox.showinfo("SUCCESSFUL","YOUR
ACCOUNT IS DELETED")
destroy_all()
else :
messagebox.showinfo("WARNING","PLEASE
CHECK CONFIRM BUTTON")
window = Frame(width=700,height=500,bg="white")
window.place(x=35,y=130)
icon =
Label(window,bg="white",width=50,height=50,image=account_info_
icon)
icon.place(x=15,y=10)
title = Label(window,text=" ACCOUNT INFO
",bg="white",fg="#000066",font="calibri 20")
title.place(x=270,y=20)
acc_name = Label(window,text=" ACCOUNT NAME :
"+global_username[0].upper(),bg="white",fg="#000066",font="calibr
i 20")
acc_name.place(x=100,y=130)
dob_name = Label(window,text=" DATE OF BIRTH :
"+call_dob(),bg="white",fg="#000066",font="calibri 20")
dob_name.place(x=100,y=190)
gen_name = Label(window,text=" GENDER :
"+call_gender(),bg="white",fg="#000066",font="calibri 20")
gen_name.place(x=100,y=250)
confirm_value = IntVar()
confirm_btn = Checkbutton(text=" CONFIRM
",font="calibri",variable=confirm_value,bg="white",fg="#000066")
confirm_btn.place(x=350,y=430)
delete_btn = Button(command=delete_my_acc,text=" DELETE
MY ACCOUNT
",font="calibri",fg="white",bg="#000066",border=0,padx=10,pady=5
)
delete_btn.place(x=305,y=480)
back_btn = Button(command=back,text=" BACK
",font="calibri",fg="white",bg="#000066",border=0,padx=10,pady=5
)
back_btn.place(x=360,y=540)

welcome_screen.bind("<Return>",delete_my_acc) # binding
enter key to proceed
welcome_screen.bind("<BackSpace>",back) # binding
backspace key to back

def menu_screen():
# creating withdraw button with an icon beside of it
withdraw_image =
Label(bg="white",width=50,height=50,image=withdraw_icon)
withdraw_image.place(x=770,y=188)
menu_im[0] = withdraw_image
withdraw_btn = Button(command=withdraw_window,text="
WITHDRAW CASH ",font="calibri
12",bg="white",fg="#000066",padx=60,pady=10)
withdraw_btn.place(x=830,y=190)
menu_btn[0] = withdraw_btn
# creating deposit button with an icon beside of it
deposit_image =
Label(bg="white",width=50,height=50,image=deposit_icon)
deposit_image.place(x=770,y=268)
menu_im[1] = deposit_image
deposit_btn = Button(command=deposit_window,text="
DEPOSIT CASH ",font="calibri
12",bg="white",fg="#000066",padx=71,pady=10)
deposit_btn.place(x=830,y=270)
menu_btn[1] = deposit_btn
# creating check_your_balance button with an icon beside of it
check_your_balance_image =
Label(bg="white",width=50,height=50,image=check_your_balance_i
con)
check_your_balance_image.place(x=770,y=348)
menu_im[2] = check_your_balance_image
check_your_balance_btn =
Button(command=check_your_balance_window,text=" CHECK
YOUR BALANCE ",font="calibri
12",bg="white",fg="#000066",padx=43,pady=10)
check_your_balance_btn.place(x=830,y=350)
menu_btn[2] = check_your_balance_btn
# creating change_your_pin button with an icon beside of it
change_your_pin_image =
Label(bg="white",width=50,height=50,image=change_your_pin_icon
)
change_your_pin_image.place(x=770,y=428)
menu_im[3] = change_your_pin_image
change_your_pin_btn =
Button(command=change_your_pin_window,text=" CHANGE
YOUR PIN ",font="calibri
12",bg="white",fg="#000066",padx=56,pady=10)
change_your_pin_btn.place(x=830,y=430)
menu_btn[3] = change_your_pin_btn
# creating account_info button with an icon beside of it
account_info_image =
Label(bg="white",width=50,height=50,image=account_info_icon)
account_info_image.place(x=770,y=508)
menu_im[4] = account_info_image
account_info_btn =
Button(command=account_info_window,text=" ACCOUNT INFO
",font="calibri 12",bg="white",fg="#000066",padx=67,pady=10)
account_info_btn.place(x=830,y=510)
menu_btn[4] = account_info_btn

def create_new_account_screen():
def back():
# destroying all the previous window
window.place_forget() # hiding the main frame
un_icon.destroy()
un_text.destroy()
un_entry.destroy()
ps_icon.destroy()
ps_text.destroy()
ps_entry.destroy()
cps_icon.destroy()
cps_text.destroy()
cps_entry.destroy()
dob_label.destroy()
year_box.destroy()
month_box.destroy()
date_box.destroy()
gender_label.destroy()
male.destroy()
female.destroy()
submit_btn.destroy()
back_btn.destroy()
#-------x-------
creating_verifying_form()
def proceed_to_menu_screen():
# hiding all the previous widgets
window.place_forget() # hiding the main frame
un_icon.destroy()
un_text.destroy()
un_entry.destroy()
ps_icon.destroy()
ps_text.destroy()
ps_entry.destroy()
cps_icon.destroy()
cps_text.destroy()
cps_entry.destroy()
dob_label.destroy()
year_box.destroy()
month_box.destroy()
date_box.destroy()
gender_label.destroy()
male.destroy()
female.destroy()
submit_btn.destroy()
back_btn.destroy()
#-------x-------
menu_screen()
def create_account(event=""):
un = un_value.get()
ps = ps_value.get()
cps = cps_value.get()
year = year_box.get()
month = month_box.get()
date = date_box.get()
dob = date + " " + month + " " + "," + " " + year
gen = gender.get()
usernames = call_usernames()

if (un=="") :
messagebox.showinfo("WARNING","PLEASE TYPE
YOUR USERNAME")
elif (len(un) <= 5) or (len(un) >= 25):
un_entry.delete(0,END)
messagebox.showinfo("WARNING","PLEASE TYPE
GENUINE USERNAME")
elif (ps=="") :
messagebox.showinfo("WARNING","PLEASE TYPE
YOUR PASSWORD")
elif (cps=="") :
messagebox.showinfo("WARNING","PLEASE TYPE
YOUR CONFIRM PASSWORD")
elif (un in usernames) :
un_entry.delete(0,END)
messagebox.showinfo("WARNING","THIS
USERNAME ALREADY EXISTS")
elif (ps != cps) :
ps_entry.delete(0,END)
cps_entry.delete(0,END)
messagebox.showinfo("WARNING","YOUR
PASSWORD AND CONFIRM PASSWORD DOES NOT MATCH")
elif (len(ps) <= 4):
ps_entry.delete(0,END)
cps_entry.delete(0,END)
messagebox.showinfo("WARNING","YOUR
PASSWORD IS TO SHORT")
elif (dob == "1 JANUARY , 2019"):
messagebox.showinfo("WARNING","PLEASE
MENTION YOUR DATE OF BIRTH")
elif (gen!=1) and (gen!=0):
messagebox.showinfo("WARNING","PLEASE
MENTION YOUR GENDER")
else :
global_username[0] = un
save_un_ps_ba_dob_gen(ps,dob,gen)
messagebox.showinfo("SUCCESSFUL","YOU HAVE
SUCCESSFULY CREATED A NEW ACCOUNT : YOUR
USERNAME IS-> "+un)
proceed_to_menu_screen()
window = Frame(width=700,height=500,bg="white")
window.place(x=210,y=130)
icon =
Label(window,bg="white",width=50,height=50,image=account_info_
icon)
icon.place(x=15,y=10)
title = Label(window,text=" CREATING NEW ACCOUNT
",bg="white",fg="#000066",font="calibri 20")
title.place(x=200,y=20)
un_icon =
Label(bg="white",width=50,height=50,image=username_icon)
un_icon.place(x=430,y=244)
un_text = Label(bg="white",text=" USERNAME :
",font="calibri 14",fg="#000066")
un_text.place(x=490,y=240)
un_value = StringVar()
un_entry =
Entry(bg="white",fg="#000066",font="calibri",textvariable=un_value
)
un_entry.place(x=499,y=270)
ps_icon =
Label(bg="white",width=50,height=50,image=password_icon)
ps_icon.place(x=430,y=324)
ps_text = Label(bg="white",text=" PASSWORD : ",font="calibri
14",fg="#000066")
ps_text.place(x=490,y=320)
ps_value = StringVar()
ps_entry =
Entry(bg="white",fg="#000066",font="calibri",textvariable=ps_value
,show="X")
ps_entry.place(x=499,y=350)
cps_icon =
Label(bg="white",width=50,height=50,image=confirm_icon)
cps_icon.place(x=430,y=404)
cps_text = Label(bg="white",text="CONFIRM
PASSWORD :",font="calibri 14",fg="#000066")
cps_text.place(x=490,y=400)
cps_value = StringVar()
cps_entry =
Entry(bg="white",fg="#000066",font="calibri",textvariable=cps_valu
e,show="X")
cps_entry.place(x=499,y=430)

dob_label =
Label(window,text="D.O.B :",bg="white",fg="#000066")
dob_label.place(x=70,y=370)
year_box = ttk.Combobox(window,width=5)
year_box["values"] =
(2019,2018,2017,2016,2015,2014,2013,2012,2011,2010,2009,2008,2
007,2006,2005,2004,2003,2002,2001,2000,1999,1998,1997,1996,199
5,1994,1993,1992,1991,1990,1989,1988,1987,1986,1985,1984,1983,
1982,1981,1980)
year_box.current(0)
year_box.place(x=130,y=370)
month_box = ttk.Combobox(window,width=10)
month_box["values"] =
("JANUARY","FEBRUARY","MARCH","APRIL","MAY","JUNE",
"JULY","AUGUST","SEPTEMBER","OCTOBER","NOVEMBER",
"DECEMBER")
month_box.current(0)
month_box.place(x=200,y=370)
date_box = ttk.Combobox(window,width=10)
date_box["values"] =
(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26
,27,28,29,30,31)
date_box.current(0)
date_box.place(x=300,y=370)

gender_label =
Label(window,text="GENDER :",bg="white",fg="#000066")
gender_label.place(x=400,y=370)
gender = IntVar()
gender.set(2)
male =
Radiobutton(window,text="MALE",value=1,variable=gender,bg="wh
ite")
female =
Radiobutton(window,text="FEMALE",value=0,variable=gender,bg="
white")
male.place(x=480,y=370)
female.place(x=560,y=370)
submit_btn = Button(command=create_account,text="
PROCEED
",font="calibri",fg="white",bg="#000066",border=0,padx=10,pady=5
)
submit_btn.place(x=580,y=550)

back_btn = Button(command=back,text=" BACK


",font="calibri",fg="white",bg="#000066",border=0,padx=10,pady=5
)
back_btn.place(x=450,y=550)

welcome_screen.bind("<Return>",create_account) # binding
enter key to proceed

def creating_verifying_form():
def proceed_to_menu_screen():
# hiding all the previous widgets
window.place_forget() # hiding the main frame
un_icon.destroy()
un_text.destroy()
un_entry.destroy()
ps_icon.destroy()
ps_text.destroy()
ps_entry.destroy()
submit_btn1.destroy()
submit_btn2.destroy()
#-------x-------
menu_screen()
def proceed_to_create_new_account_screen():
# hiding all the previous widgets
window.place_forget() # hiding the main frame
un_icon.destroy()
un_text.destroy()
un_entry.destroy()
ps_icon.destroy()
ps_text.destroy()
ps_entry.destroy()
submit_btn1.destroy()
submit_btn2.destroy()
#-------x-------
create_new_account_screen()
def verify_un_and_ps(event=""):
username = un_value.get()
password = ps_value.get()
registered_usernames = call_usernames()
if (username in registered_usernames):
global_username[0] = username # inserted username in
global_username
registered_password = call_password()
if (registered_password==password):
proceed_to_menu_screen()
elif (password==""):
messagebox.showinfo(" WARNING "," PLEASE
ENTER YOUR PASSWORD ")
else:
ps_entry.delete(0,END)
messagebox.showinfo(" WARNING "," YOUR
PASSWORD IS WRONG ")
else :
un_entry.delete(0,END)
ps_entry.delete(0,END)
messagebox.showinfo(" WARNING ", " PLEASE
ENTER YOUR USERNAME AND PASSWORD CORRECTLY ")
# verifying form
window = Frame(width=700,height=500,bg="white")
window.place(x=210,y=130)
icon1 =
Label(window,bg="white",width=50,height=50,image=account_info_
icon)
icon1.place(x=15,y=10)
icon2 =
Label(window,bg="white",width=50,height=50,image=account_info_
icon)
icon2.place(x=630,y=10)
title = Label(window,text=" VERIFY YOUR ACCOUNT
",bg="white",fg="#000066",font="calibri 20")
title.place(x=215,y=20)
un_icon =
Label(bg="white",width=50,height=50,image=username_icon)
un_icon.place(x=430,y=274)
un_text = Label(bg="white",text=" USERNAME :
",font="calibri 14",fg="#000066")
un_text.place(x=490,y=270)
un_value = StringVar()
un_entry =
Entry(bg="white",fg="#000066",font="calibri",textvariable=un_value
)
un_entry.place(x=499,y=300)
ps_icon =
Label(bg="white",width=50,height=50,image=password_icon)
ps_icon.place(x=430,y=374)
ps_text = Label(bg="white",text=" PASSWORD : ",font="calibri
14",fg="#000066")
ps_text.place(x=490,y=370)
ps_value = StringVar()
ps_entry =
Entry(bg="white",fg="#000066",font="calibri",textvariable=ps_value
,show="X")
ps_entry.place(x=499,y=400)
submit_btn1 = Button(command=verify_un_and_ps,text="
PROCEED
",font="calibri",fg="white",bg="#000066",border=0,padx=10,pady=5
)
submit_btn1.place(x=520,y=470)
submit_btn2 =
Button(command=proceed_to_create_new_account_screen,text="
CREATE A NEW ACCOUNT
",font="calibri",fg="white",bg="#000066",border=0,padx=10,pady=5
)
submit_btn2.place(x=465,y=530)

welcome_screen.bind("<Return>",verify_un_and_ps) # binding
enter key to proceed

''' ------------ creating image background ---------- '''

bg_image = Label(image = window_bg).pack() # setting image as a


background

header = Label(text = "WELCOME TO YOUR BANK",font =


"calibri 20",bg="#fff",fg="#000066",width=80,pady=15) #creating
header
header.place(x=0,y=0) #header placing at top

icon1 = Label(image = bank_icon,bg="#fff",height=50,width=50)


#icon1 showing
icon1.place(x=350,y=6) #icon1 placing
icon2 = Label(image = bank_icon,bg="#fff",height=50,width=50)
#icon2 showing
icon2.place(x=720,y=6) #icon2 placing

creating_verifying_form()

welcome_screen.mainloop() # stoping welcome window to close


OUTPUT
TO VERIFY ACCOUNT
MAIN-PAGE

TO DEPOSIT CASH
TO CHECK BALANCE

TO CHANGE PIN
TO CHECK ACCOUNT DETAILS

TO WITHDRAW CASH
DATABASE
CONCLUSION

So, with the help of ATM software, banking


management system is automated helping you
to not only improve accuracy but also
significantly reduce costs.

Consequently, it assists you to manage your


withdrawals, to deposit cash and to check the
balance amount in your bank account. Having
a banking management system will ensure that
all the bank details are recorded. Also, the
system also helps you to change the password
of your account.
ANALYSIS

This project has helped me to understand the


basics of python programming and to gain
hands-on experience on testing this knowledge
of python tkinter GUI(Graphical User
Interface)module, error handling, data
validation, connectivity between python
frontend and mysql database backend.
BIBLIOGRAPHY

 Stationary refered:
o Computer Science With PYTHON By
Sumita Arora
 Websites:
o https://docs.python.org/3/tutorial
TEACHER’S REMARK

 Remarks:

 Signature:
Thank
You

You might also like