project
project
This is a simple GUI based system which is very easy to understand and use .In this
project , it contains all the basic functions of bank .Creating a new account
,Transactions like withdrawal and deposit amount to the account ,Getting the balance
details ,Closing an account Updating the account details.
In this project, he /she can use all those available features easily without any restruction.
It is too easy to use, he/she can check the total bank account records easily. Talking about
the features of the bank management system, A user can create an account by providing
the name of the account holder, number, selecting amount type (Saving account or
current account) and providing an initial amount more than or equal to 500.
Then the user can also deposit and withdraw money just by providing his/her account and
entering the amount. For certain purpose, he /she can also check for the balance inquiry
which displays the account number and amount. He / She can also view the entire
account holder’s list. Another feature s that he/she can modify their account detail and
type if they want to.
This simple GUI based Bank Management system provides the simplest management of
bank account and transaction. In short, this project mainly focuses on CRUD operation.
There’ s an external database connection file used in this project to save user’s data
permanently.
TABLE OF CONTENTS
Chapter No. TITLE Page
ABSTRACT V
LIST OF VI
FIGURES I
1 INTRODUCTION 1
2 LITERATURE SURVEY 2
3 AIM AND SCOPE OF PRESENT INVESTIGATION 3
3.1 AIM OF THE PROJECT 3
3.2 SCOPE AND OBJECTIVE 3
3.3 SYSTEM REQUIREMENTS 4
3.3.1 HARDWARE REQUIREMENTS 4
3.3.2 SOFTWARE REQUIREMENTS 4
3.4 SOFTWARE USED 5
3.4.1 PYTHON LANGUAGE 5
3.4.2 PYTHON CHARACTERISTICS 5
3.4.3 APPLICATIONS OF PYTHON 5
3.5 PYCHARM 6
3.6 TKINTER 8
3.7 PICKLE 12
LIST OF FIGURES
FIGURE NO: FIGURE NAME PAGE NO
A program performs a task in the computer. But, in order to be executed, a program must be
written in the machine language of the processor of a computer.
Unfortunately, it is extremely difficult for humans to read or write a machine language
program. This is because a machine language is entirely made up of sequences of bits.
However, high level languages are close to natural languages like English and only use
familiar mathematical characters, operators and expressions.
Then the user can also deposit and withdraw money just by providing
his/her account and entering the amount. For certain purpose, he/she can also check for the
balance inquiry which displays the account number and amount. He/she can also view all the
account holder’s list. Another feature is that he/she can modify their account detail and type
if they want to.
CHAPTER 2
LITERATURE SURVEY
LITERATURE SURVEY
1. Our business is selling financial services in Oregon and in selected regional, national,
and international markets. We will extend our business into areas that provide sound
expansion opportunities meeting predetermined profit criteria.
2. We will strive for stability in earning growth, acquiring high-quality investments,
and pursuing sound and innovative tactics ‘. Through strategic planning and strong
management, we will aggressively expand income sources while remaining in control
of costs.
3. Management will provide continuity of policies and directions. Changes will be
implemented quickly and in a manner that considers both individual and corporate
needs.
3.3 SYSTEM REQUIREMENTS
1. Processor i3
3.3.2 2. RAM 8 GB
Software
3. Processor 2.4 GHz
It provides rich data types and easier to read syntax than any other programming
languages
It is a platform independent scripted language with full access to operating system
API's
Compared to other programming languages, it allows more run-time flexibility
It includes the basic text manipulation facilities of Perl and Awk
A module in Python may have one or more classes and free functions
Libraries in Pythons are cross-platform compatible with Linux, Macintosh, and
Windows
For building large applications, Python can be compiled to byte-code
Python supports functional and structured programming as well as OOP
It supports interactive mode that allows interacting Testing and debugging of
snippets of code
In Python, since there is no compilation step, editing, debugging and testing is fast.
3.4.3 Applications of Python Programming
Web Applications:
You can create scalable Web Apps using frameworks and CMS (Content
Management System) that are built on Python. Some of the popular platforms for 8 creating
Web Apps are: Django, Flask, Pyramid, Plone , Django CMS. Sites like Mozilla, Reddit,
Instagram and PBS are written in Python.
3.5 PYCHARM:
PyCharm is a dedicated Python Integrated Development Environment (IDE)
providing a wide range of essential tools for Python developers, tightly integrated to create a
convenient environment for productive Python, web, and data science development.
PyCharm is available in three editions:
Community (free and open-sourced): for smart and intelligent Python development,
including code assistance, refactorings, visual debugging, and version control
integration.
Professional (paid) : for professional Python, web, and data science development,
including code assistance, refactorings , visual debugging, version control integration,
remote configurations, deployment, support for popular web frameworks, such as
Django and Flask, database support, scientific tools (including Jupyter notebook
support), big data tools.
Edu (free and open-sourced): for learning programming languages and related
technologies with integrated educational tools.
Supported languages :
Tensorflow is a cross-platform IDE that works on Windows, macOS, and Linux. Check the
system requirements:
Disk space 2.5 GB and another 1 GB for caches SSD drive with at
Least 5GB of free space
1024x768 1920×1080
Monitor resolution
Easy to learn.
Use very little code to make a functional desktop application.
Layered design.
Portable across all operating systems including Windows, macOS, and Linux.
Pre-installed with the standard Python library.
1.Tkinter Fundamentals
Tkinter Hello, World! – show you how to develop the first Tkinter program
called Hello, World!
Window – learn how to manipulate various attributes of a Tkinter window
including title, size, location, resizability, transparency, and stacking order.
Tk Themed Widgets – introduce you to Tk themed widgets.
Setting options for a widget – learn various ways to set options for a widget.
Command Binding – learn how to respond to events using command
bindings.
Event Binding – show you how to use the bind() method to bind an event of a widget.
Label – learn how to use the Label widget to show a text or image on a frame or
window.
Button – walk you through the step of creating buttons.
Entry – learn how to create a textbox using the Entry widget.
2. Layout Managements
Geometry managers allow you to specify the positions of widgets inside a top-level or
parent window.
pack – show you how to use the pack geometry manager to arrange widgets on a
window.
grid – learn how to use the grid geometry manager to place widgets on a
container.
place – show you how to use the place geometry manager to precisely
position widgets within its container using the (x, y) coordinate system.
Tkinter provides you with some commonly used widgets, which allow you to start
developing applications more quickly.
Tkinter example – show you how to build a simple application that converts a
temperature from Fahrenheit to Celsius.
Displaying a message box – show you how to display various message boxes
including information, warning, and error message boxes.
Displaying a Yes/No Dialog – show you how to use the askyes no() function to
display a yes/no dialog.
Display an OK/Cancel Dialog – show you how to use the askok
cancel() function to display an OK/Cancel dialog.
Display a Retry/Cancel Dialog – show you how to use the askretry
cancel() function to display a Retry/Cancel dialog.
Show an Open File Dialog – display an open file dialog to allow users to select
one or more files.
Displaying the Native Color Chooser – show you how to display the native color-
chooser dialog.
Menu – learn how to add a menu bar and menus to a window.
Menu button – show you how to the Menu button widget.
Option Menu – Walk you through the steps of creating an Option Menu widget that
provides a list of options in a drop-down menu.
7. Tkinter Themes and Styles
Changing the ttk theme – how to change the default ttk theme to the new one.
Modifying ttk style – show you how to change the appearance of widgets by
modifying or extending the ttk style.
Understanding ttk elements – help you understand ttk elements and how to use
them to change the appearance of widgets.
Modifying the appearance of a widget based on its states – show you how to
dynamically change the appearance of a widget based on its specific state.
Scheduling a task with the after() method – how to use the after() method to
schedule a task that will run after a timeout has elapsed.
Developing multithreading Tkinter Applications – show you how to use the
threading module to develop a multithreading Tkinter application.
Displaying a progress bar while a thread is running – walk you through the steps
of connecting a progress bar with a running thread.
Tkinter MVC – structure a tkinter application using the MVC design pattern.
Tkinter validation – show you how to use the Tkinter validation to validate user
inputs.
Tkinter & Matplotlib – show you how to display a bar chart from the matplotlib in
Python.
3.7 Pickle
Pickle is used for serializing and de-serializing
Python object structures, also called marshalling or flattening. Serialization refers to the
process of converting an object in memory to a byte stream that can be stored on disk or sent
over a network. Later on, this character stream can then be retrieved and de-serialized back to a
Python object. Pickling is not to be confused with compression! The former is the conversion
of an object from one representation (data in Random Access Memory (RAM)) to another (text
on disk), while the latter is the process of encoding data with fewer bits, in order to save disk
space.
Why Pickle?: In real world sceanario, the use pickling and unpickling are widespread as they
allow us to easily transfer data from one server/system to another and then store it in a file or
database.
Precaution: It is advisable not to unpickle data received from an untrusted source as they may
pose security threat. However, the pickle module has no way of knowing or raise alarm while
pickling malicious data.
Only after importing pickle module we can do pickling and unpickling. Importing pickle can be
done.
CHAPTER 4
The by looking at disadvantages these are pretty serious for any banking
system as they are capable of bringing down the whole system. By digitalization in the
banking system, it will not only achieve its goals and also will give some benefits like less
manual calculation will be required.
Module 2: Transaction
The transactions are doing every day. It manages all the
transactions like new account entry, deposit as well as withdraw entry, transaction of money for
various processes. A bank transaction is a record of money that has moved in and out of
your bank account. When you have costs associated with your business - for example, rent for
office space - the payments for these will come out of your bank account as transactions.
The formation of your asset accounts, capital accounts and liability accounts all rely on
bank transactions. A transaction account, also called a checking account, chequing account,
current account, demand deposit account, or share draft account at credit unions, is a deposit
account held at a bank or other financial institution. It is available to the account owner "on
demand" and is available for frequent and immediate access by the account owner or
toothers as the account owner may direct. Access may be in a variety of ways, such as cash
withdrawals, use of debit cards, cheques (checks) and electronic transfer. In economic terms,
the funds held in a transaction account are regarded as liquid funds. In accounting terms,
they are considered as cash.
Here are some steps which you can follow to close your
bank account. But before you go for it don't forget to delink your bank account from any of
the payments platforms or service apps like Paytm, Uber, Swiggy etc.
Here are a few things you need to know before closing your bank account.
Once you close your account you cannot re-open it again
Before proceeding with the account closure you should make the balance to zero
In case if there are any pending dues, then you should clear it before closing the
account
Before closing an account you should take the complete bank statement of your
account for future use.
Visit Bank
You cannot close your bank account online. You need to visit
your home branch where you opened the account. So you need to walk into the home branch
where you have an account and request them for account closure.
Account closure form
All banks provide an account closure form, which you can procure from the bank’s branch or
website. If you have a joint account, then all account holders will have to give their consent
by signing the closure form.
Cheque Book: You need to return the cheque book along with remaining cheque
leaves to the respective bank branch at the time of closing their account.
Passbook: You should also handover your passbook to the bank at the time of
closing their SBI account.
Debit Card: The account holder should also return their debit card which is used
to withdraw money from ATM.
ID proof: Some bank may even ask you for ID proof and address proof
before closing your account.
Closure charges
Some banks charge for the account closure. For example, SBI Bank's don't charge for the
closure within 14 days of the opening of an account. Any closure of the SBI bank account
after 14 days but before 1 year are subject to some closure charges.
Keep these things in mind and don’t let unwanted bank accounts lie idle as there is no
benefit in making yourself overburdening in gathering information and statements from too
many banks. So close unwanted account they serve no good to your financial life.
Module 4: Deposit Amount
Bank Entity : Attributes of Bank Entity are Bank Name, Code and
Address.
Code is Primary Key for Bank Entity.
Customer Entity : Attributes of Customer Entity are Customer id, Name, Phone
Number and Address.
Customer id is Primary Key for Customer Entity.
Branch Entity : Attributes of Branch Entity are Branch id, Name and
Address.
Branch id is Primary Key for Branch Entity.
Account Entity : Attributes of Account Entity are Account number,
Account type and Balance.
Account number is Primary Key for Account Entity.
Loan Entity : Attributes of Loan Entity are Loan id, Loan Type and
Amount.
Loan id is Primary Key for Loan Entity.
Relationships are :
5.2 NEW ACCOUNT: This is how the customers are created with a bank account
5.6 TRANSACTION: This is how the transactions are doing every day. It
manages all the transactions like new account entry, deposit as well as withdraw
entry transaction of money for various processes.
6.1 CONCLUSION
Bank is the place where customers feel the sense of safety for their
property. In the bank, customers deposit and withdraw their money. Smooth and
efficient management affects the satisfaction of the customers and staff members,
indirectly. And of course, it encourages management committee in taking some needed
decision for future enhancement of the bank. Now a days, managing a bank is tedious
job up to certain limit. So software that reduces the work is essential. Thus, considering
above necessities, the software for bank management has became necessary which
would be useful in managing the bank more efficiently.
Our software will perform and fulfill all the tasks that any
customer would desire. It is developed as a software program for managing the entire
bank process related to customer accounts to keep each every track about their property
and their various transaction processes efficiently. Hereby, our main objective is the
customer’s satisfaction considering today’s faster world.
In the recent years, computers are included in almost all kind of
works and jobs everyone come across in the routine. The availability of the software’s
for almost every process or every system has taken the world in its top-gear and fastens
the day-to-day life.
So, we have tried our best to develop the software program for the
Bank Management System where all the tasks to manage the bank system are performed
easily and efficiently.
Thus, above features of this software will save transaction time and
therefore increase the efficiency of the system.
Requirements definition and management is
recognized as a necessary step in the delivery of successful system s and software
projects, discipline is also required by standards, regulations, and quality improvement
initiatives. Creating and managing requirements is a challenge of IT, systems and product
development projects or indeed for any activity where you have to manage a contractual
relationship.
1. Python For Desktop Applications: How to develop, pack and deliver Python
applications with TkInter by Tran Duc Loi
2. Python in A Nutshell: A Desktop Quick Reference, Third Edition by Alex
Martelli , Anna Ravenscroft , Steve Holden
3. The Python Language Reference Manual (version 3.2) by Guido van Rossum, and
Fred L. Drake, Jr. (Editor)
4. Dr. Geeta Sharma, “Study of Internet Banking Scenario in India”, International
Journal of Emerging Research in Management &Technology, ISSN: 2278- 9359,
Volume 5, Issue 5, 2016, pp.43-48.
5. Anju Dagar, “Online Banking : Benefits and Related Issues”, International
Journal of Commerce, Business and Management (IJCBM), ISSN: 2319–
2828,Vol. 3, No. 5, 2014, pp.715-719.
6. Ebubeogu Amarachukwu Felix, “ Bank Customers Management System”,
International Journal of Scientific & Technology Research Volume 4, Issue 08, 2015,
pp.326- 343.
7. Mahmood Shah, “E-Banking Management: Issues, Solutions, and Strategies”, 2009.
8. Muhammad Abdus Sattar Titu and Md. Azizur Rahman, “ Online Banking System-Its
Application in Some Selected Private Commercial Banks in Bangladesh”, IOSR
Journal of Business and Management (IOSR-JBM) e- ISSN: 2278- 487X, Volume 9,
Issue 4,2013, pp.37-44.
9. Bahman Saeidipour, Hojat Ranjbar and Saeed Ranjbar, “Adoption of Internet
banking”, IOSR Journal of Business and Management (IOSR-JBM) e-ISSN: 2278-
487X, Volume 11, Issue 2 2013, pp.46-51.
10. D.Amutha, “A Study of Consumer Awareness towards eBanking”, Int J Econ
Manag Sci, ISSN: 2162-6359, Volume 5, issue 4, 2016, pp.1-4.
APPENDIX
SORCE CODE
import sqlite3
import tkinter as tk
from tkinter import messagebox, ttk
# Database Connection
def connect_db():
conn = sqlite3.connect("bank.db")
cursor = conn.cursor()
cursor.execute('''CREATE TABLE IF NOT EXISTS users (id INTEGER PRIMARY KEY,
username TEXT, password TEXT)''')
cursor.execute('''CREATE TABLE IF NOT EXISTS accounts (
acc_no INTEGER PRIMARY KEY AUTOINCREMENT,
name TEXT,
phone TEXT,
acc_type TEXT,
email TEXT,
balance REAL)''')
# Register Function
def register():
def submit():
username = entry_user.get()
password = entry_pass.get()
if username and password:
conn = sqlite3.connect("bank.db")
cursor = conn.cursor()
cursor.execute("INSERT INTO users (username, password) VALUES (?, ?)", (username,
password))
conn.commit()
conn.close()
messagebox.showinfo("Success", "Registration Successful!")
reg_window.destroy()
else:
messagebox.showerror("Error", "All fields are required!")
reg_window = tk.Toplevel()
reg_window.title("Register")
reg_window.geometry("400x300")
reg_window.configure(bg="lightblue")
tk.Label(reg_window, text="Username", bg="lightblue").pack()
entry_user = tk.Entry(reg_window)
entry_user.pack()
tk.Label(reg_window, text="Password", bg="lightblue").pack()
entry_pass = tk.Entry(reg_window, show="*")
entry_pass.pack()
tk.Button(reg_window, text="Submit", command=submit, bg="green", fg="white").pack()
# Login Function
def login():
def verify():
username = entry_user.get()
password = entry_pass.get()
conn = sqlite3.connect("bank.db")
cursor = conn.cursor()
cursor.execute("SELECT * FROM users WHERE username=? AND password=?", (username,
password))
user = cursor.fetchone()
conn.close()
if user:
messagebox.showinfo("Success", "Login Successful!")
login_window.destroy()
main_menu()
else:
messagebox.showerror("Error", "Invalid Credentials!")
login_window = tk.Tk()
login_window.title("Login")
login_window.geometry("400x300")
login_window.configure(bg="lightgreen")
tk.Label(login_window, text="Username", bg="lightgreen").pack()
entry_user = tk.Entry(login_window)
entry_user.pack()
tk.Label(login_window, text="Password", bg="lightgreen").pack()
entry_pass = tk.Entry(login_window, show="*")
entry_pass.pack()
tk.Button(login_window, text="Login", command=verify, bg="blue", fg="white").pack()
tk.Button(login_window, text="Register", command=register, bg="orange", fg="white").pack()
login_window.mainloop()
# Main Menu
def main_menu():
menu = tk.Tk()
menu.title("Bank Management System")
menu.geometry("800x600")
menu.configure(bg="lightyellow")
tk.Label(menu, text="Bank Management System", font=("Arial", 20, "bold"), fg="blue",
bg="lightyellow").pack(pady=20)
menu.mainloop()
account_window = tk.Toplevel()
account_window.title("Create Bank Account")
account_window.geometry("400x400")
account_window.configure(bg="lightblue")
tk.Label(account_window, text="Name:", font=("Arial", 12), bg="lightblue").pack(pady=5)
name_entry = tk.Entry(account_window, font=("Arial", 12))
name_entry.pack(pady=5)
account_window.mainloop()
def view_balance():
def check_balance():
acc_no = acc_entry.get()
if acc_no:
conn = sqlite3.connect("bank.db")
cursor = conn.cursor()
cursor.execute("SELECT balance FROM accounts WHERE acc_no = ?", (acc_no,))
result = cursor.fetchone()
conn.close()
if result:
messagebox.showinfo("Balance", f"Your account balance is: {result[0]}")
else:
messagebox.showerror("Error", "Account not found!")
else:
messagebox.showwarning("Input Error", "Please enter an account number!")
balance_window = tk.Toplevel()
balance_window.title("View Balance")
balance_window.geometry("300x200")
balance_window.configure(bg="lightgray")
balance_window.mainloop()
def deposit():
def submit_deposit():
acc_no = acc_entry.get()
amount = amount_entry.get()
if acc_no and amount:
try:
amount = float(amount)
conn = sqlite3.connect("bank.db")
cursor = conn.cursor()
cursor.execute("SELECT balance FROM accounts WHERE acc_no = ?", (acc_no,))
result = cursor.fetchone()
if result:
new_balance = result[0] + amount
cursor.execute("UPDATE accounts SET balance = ? WHERE acc_no = ?",
(new_balance, acc_no))
conn.commit()
conn.close()
messagebox.showinfo("Success", f"Amount {amount} deposited successfully! New
Balance: {new_balance}")
deposit_window.destroy()
else:
messagebox.showerror("Error", "Account not found!")
except ValueError:
messagebox.showerror("Error", "Please enter a valid amount!")
else:
messagebox.showwarning("Input Error", "Please enter all details!")
deposit_window = tk.Toplevel()
deposit_window.title("Deposit Money")
deposit_window.geometry("300x200")
deposit_window.configure(bg="lightgreen")
deposit_window.mainloop()
def withdraw():
def submit_withdraw():
acc_no = acc_entry.get()
amount = amount_entry.get()
if acc_no and amount:
try:
amount = float(amount)
conn = sqlite3.connect("bank.db")
cursor = conn.cursor()
cursor.execute("SELECT balance FROM accounts WHERE acc_no = ?", (acc_no,))
result = cursor.fetchone()
if result:
if result[0] >= amount:
new_balance = result[0] - amount
cursor.execute("UPDATE accounts SET balance = ? WHERE acc_no = ?",
(new_balance, acc_no))
conn.commit()
conn.close()
messagebox.showinfo("Success", f"Amount {amount} withdrawn successfully! New
Balance: {new_balance}")
withdraw_window.destroy()
else:
messagebox.showerror("Error", "Insufficient Balance!")
else:
messagebox.showerror("Error", "Account not found!")
except ValueError:
messagebox.showerror("Error", "Please enter a valid amount!")
else:
messagebox.showwarning("Input Error", "Please enter all details!")
withdraw_window = tk.Toplevel()
withdraw_window.title("Withdraw Money")
withdraw_window.geometry("300x200")
withdraw_window.configure(bg="lightcoral")
withdraw_window.mainloop()
# Function to view transactions
def view_transactions():
def show_transactions():
acc_no = acc_entry.get()
if acc_no:
conn = sqlite3.connect("bank.db")
cursor = conn.cursor()
cursor.execute("SELECT type, amount, timestamp FROM transactions WHERE acc_no = ?
ORDER BY timestamp DESC", (acc_no,))
transactions = cursor.fetchall()
conn.close()
if not transactions:
messagebox.showinfo("No Transactions", "No transactions found for this account.")
return
trans_window = tk.Toplevel()
trans_window.title("Transaction History")
trans_window.geometry("600x400")
trans_window = tk.Toplevel()
trans_window.title("View Transactions")
trans_window.geometry("300x200")
trans_window.mainloop()
if acc_no:
conn = sqlite3.connect("bank.db")
cursor = conn.cursor()
cursor.execute("UPDATE accounts SET name = ?, phone = ?, email = ? WHERE acc_no
= ?", (new_name, new_phone, new_email, acc_no))
conn.commit()
conn.close()
messagebox.showinfo("Success", "Customer details updated successfully!")
update_window.destroy()
else:
messagebox.showwarning("Input Error", "Please enter a valid account number!")
update_window = tk.Toplevel()
update_window.title("Update Customer Details")
update_window.geometry("400x300")
update_window.mainloop()
def view_accounts():
def staff_login():
username = user_entry.get()
password = pass_entry.get()
conn = sqlite3.connect("bank.db")
cursor = conn.cursor()
cursor.execute("SELECT * FROM staff WHERE username = ? AND password = ?",
(username, password))
staff = cursor.fetchone()
conn.close()
if staff:
staff_login_window.destroy()
show_accounts()
else:
messagebox.showerror("Login Failed", "Invalid Credentials")
def show_accounts():
conn = sqlite3.connect("bank.db")
cursor = conn.cursor()
cursor.execute("SELECT * FROM accounts")
accounts = cursor.fetchall()
conn.close()
accounts_window = tk.Toplevel()
accounts_window.title("All Customer Accounts")
accounts_window.geometry("600x400")
tk.Label(staff_login_window, text="Username:").pack(pady=5)
user_entry = tk.Entry(staff_login_window)
user_entry.pack(pady=5)
tk.Label(staff_login_window, text="Password:").pack(pady=5)
pass_entry = tk.Entry(staff_login_window, show="*")
pass_entry.pack(pady=5)
staff_login_window.mainloop()
def close_account():
def delete():
acc_no = acc_entry.get()
if acc_no:
confirm = messagebox.askyesno("Confirm", "Are you sure you want to delete this
account?")
if confirm:
conn = sqlite3.connect("bank.db")
cursor = conn.cursor()
cursor.execute("DELETE FROM accounts WHERE acc_no = ?", (acc_no,))
conn.commit()
conn.close()
messagebox.showinfo("Success", "Account deleted successfully!")
close_window.destroy()
else:
messagebox.showwarning("Input Error", "Please enter a valid account number!")
close_window = tk.Toplevel()
close_window.title("Close Account")
close_window.geometry("300x200")
close_window.mainloop()
def exit_application():
confirm = messagebox.askyesno("Exit", "Are you sure you want to exit?")
if confirm:
root.destroy()
# Function to exit application
def exit_application():
confirm = messagebox.askyesno("Exit", "Are you sure you want to exit?")
if confirm:
root.quit()
# Initialize Database
connect_db()
# Start Login
login()