You are on page 1of 17

Table of Contents

1. Certificate

2. Acknowledgement

3. Introduction

4. About Python

5. About MySQL

6. Requirements

7. Coding

8. Bibliography
CERTIFICATE
This is to certify that of class Xll Science
has prepared this report on the project entitled “ Bank
Management System”.

This report is the result of his efforts and endeavors.


The report is found worthy of acceptance as final
report for the subject Computer science. He/She has
prepared the report under my guidance.

(Mr. Rohit Agarwal)


PGT Computer Science
ACKNOWLEDGEMENT
It gives me a great pleasure to express my gratitude towards our
Computer teacher Mr. Rohit Agarwal for his guidance, support
and encouragement throughout the duration of project. I would
also like thanks to our director Madam Priti Bhatia and our
principal Madam Mrs. Rajni Nautiyal for their encouragement.
Without their motivation and help, this project would not be
completed successfully.

your name
INTRODUCTION
This project is about ……
ABOUT PYTHON
Introduction

It is widely used general purpose,high level programming


language.developed by guido vanrossum in 1991.it is used
for: software developMent, web development (server-side),
systeM scripting, MatheMatics.

Features of python

1. Easy to use : due to siMple syntax rule


2. Interpreted language : code execution
& interpretation line by line.
3. Cross-Platform language : it can run
on windows, linux, Macinetosh etc.
equally
4. Expressive language : less code to be written as it
itself express the purpose of the code.
5. Completeness : support wide range of library.
6. Free & Open source : can be downloaded freely
and source code can be Modify for improvement.

Drawbacks of python
1. Lesser libraries : as compared to other
programming languages like c++,java,.net etc.
2. Slow language : as it is interpreted languages,it
executes the program slowly.
3. Weak on type-binding : it not pin point on
use of a single variable for different data type.
ABOUT MYSQL
Introduction
MySQL is currently the Most popular open source
database software. it is a Multi-user, Multithreaded
database Management system.

MySQL is especially popular on the web. it is one of


the parts of the very popular platform such as linux,
windows etc.

MySQL was founded by Michael widenius (Monty),


david axMarK and allan larsson in sweden in year
1995.
Features of MySQL:
Open source & free of cost: it is open source and
available at free of cost.

Portability: Small enough in size to install and run


it on any types of hardware and OS liKe linux, MS
windows or Mac etc.

Security : its databases are secured & Protected


with password.

Connectivity : various apis are developed to


connect it with Many programming languages.

Query language : it supports SQL (Structured


Query language) for handling database.
REQUIREMENTS
Hardware Requirements
Computer,for coding and typing the required Documents of the
project.
Printer, to print the required documents of the Project.
Compact Drive.
Processor : Pentium Quad core
RAM : 64 Mb
Hard Disk : 20 gb

Software requirements
Operating system : windows 7 or above
Python 3 : for execution of program
MySQL : for storing data in the database
Python – mysql connector : for database
Connectivity
Microsoft Word, for documentation.
CODING
SQL Commands to create both the tables:
Account table:
mysql> CREATE TABLE ACCOUNT(Accno int(15) NOT NULL Primary Key,Name varchar(25) Not
Null,Age int(5) Not Null,occu varchar(15) not null,Address varchar(50) not null,Mob int(11) not
null,Aadharno int(16),amt double(20,5),AccType varchar(15) not null);
Amt table:
mysql> CREATE TABLE amt(Accno int(15), Amtdeposite double(20,5),month varchar(15) not null);
Python Code:
import os
import platform
import mysql.connector
import pandas as pd
mydb=mysql.connector.connect(host="localhost",\
user="root",\
password="root",\
database="Bank")
mycursor=mydb.cursor() def
AccInsert():
L=[]
Accno=int(input("Enter the Account number : "))
L.append(Accno)
name=input("Enter the Customer Name: ")
L.append(name)
age=int(input("Enter Age of Customer : "))
L.append(age)
occup=input("Enter the Customer Occupation : ")
L.append(occup)
Address=input("Enter the Address of the Customer : ")
L.append(Address)
Mob=int(input("Enter the Mobile number : "))
L.append(Mob)
Aadharno=int(input("Enter the Aadhar number : "))
L.append(Aadharno)
Amt=float(input("Enter the Money Deposited : "))
L.append(Amt)
AccType=input("Enter the Account Type (Saving/RD/PPF/Current) : ")
L.append(AccType)
cust=(L)
sql="Insert into ACCOUNT(Accno ,Name,Age,occu,Address,Mob,Aadharno,amt,AccType) values(%s,%s,%s,
%s,%s,%s, %s,%s,%s)"
mycursor.execute(sql,cust)
mydb.commit()
def AccView():
print("Select the search criteria : ")
print("1. Acc no")
print("2. Name")
print("3. Mobile")
print("4. Adhar")
print("5. View All")

ch=int(input("Enter the choice : ")) if


ch==1:
s=int(input("Enter ACC no : "))
rl=(s,)
sql="select * from account where Accno=%s"
mycursor.execute(sql,rl)
elif ch==2:
s=input("Enter Name : ")
rl=(s,)
sql="select * from account where Name=%s"
mycursor.execute(sql,rl)
elif ch==3:
s=int(input("Enter Mobile No : "))
rl=(s,)
sql="select * from account where Mob=%s"
mycursor.execute(sql,rl)
elif ch==4:
s=input("Enter Adhar : ")
rl=(s,)
sql="select * from account where Aadharno=%s"
mycursor.execute(sql,rl)
elif ch==5:
sql="select * from account"
mycursor.execute(sql)
res=mycursor.fetchall()
print("The Customer details are as follows : ")
#print("(Accno ,Name,Age,occu,Address,Mob,Aadharno,amt,AccType)") #for
x in res:
k=pd.DataFrame(res,columns=['AcNo','Name','Age','Occn','Add','Mob','Aadh','Amt','AccTy']) print(k)
#print(x)
def AccDeposit():
L=[]
Accno=int(input("Enter the Account number : "))
L.append(Accno)
Amtdeposit=eval(input("Enter the Amount to be deposited : ")) L.append(Amtdeposit)
month=input("Enter month of Salary : ")
L.append(month)
cust=(L)
sql="Insert into amt(Accno,Amtdeposit,Month) values(%s,%s,%s)"
mycursor.execute(sql,cust)
mydb.commit()
def accView():
print("Please enter the details to view the Money details :")
Accno=int(input("Enter the Account number of the Customer whose amount is to be viewed : ")) sql="Select
Account.Accno, Account.Name,
Account.Age,Account.occu,Account.Address,Account.Mob,Account.Aadharno,Account.Amt,Acc ount.AccType,
sum(amt.Amtdeposit), amt.month from Account INNER JOIN amt ON Account.Accno=amt.Accno and
amt.Accno = %s"
rl=(Accno,)
mycursor.execute(sql,rl)
res=mycursor.fetchall() for
x in res:
print(x)
def closeAcc():
Accno=int(input("Enter the Account number of the Customer to be closed : "))
rl=(Accno,)
sql="Delete from amt where Accno=%s"
mycursor.execute(sql,rl)
sql="Delete from Account where Accno=%s"
mydb.commit()
def MenuSet(): #Function For The Student Management System
print("Enter 1 : To Add Customer")
print("Enter 2 : To View Customer ") print("Enter
3 : To Deposit Money ") print("Enter 4 : To Close
Account") print("Enter 5 : To View All Customer
Details") try: #Using Exceptions For Validation
userInput = int(input("Please Select An Above Option: ")) #Will Take Input From User except
ValueError:
exit("\nHy! That's Not A Number") #Error Message else:
print("\n") #Print New Line
if(userInput == 1):
AccInsert()
elif (userInput==2):
AccView()
elif (userInput==3):
AccDeposit()
elif (userInput==4):
closeAcc()
elif (userInput==5):
accView()
else:
print("Enter correct choice. . . ") MenuSet()
def runAgain():
runAgn = input("\nwant To Run Again Y/n: ")
while(runAgn.lower() == 'y'): if(platform.system()
== "Windows"): print(os.system('cls'))
else:
print(os.system('clear'))
MenuSet()
runAgn = input("\nwant To Run Again Y/n: ")
runAgain()
Bibliography
(Books Reference)

“Computer Science with Python”
by Sumita Arora.

“Information Practices with
Python” by Sumita Arora.
(Web Reference)

www.pythonprojects.com

www.1000projects.com

www.wikipedia.com

You might also like