COMP PROJECT
COMP PROJECT
3. Interpreted language
Python is an interpreted language not a compiled language.
This means that Python installation interprets and executes
the code. Line by line at a time .It makes Python easy to
debug language and thus suitable for beginners to advance
users.
2.Ease of use
MySQL is a high performance, relatively simple database
system. From
beginning, MySQL has typically been configured, monitored
and managed from the command line. However, several
MySQL graphical interfaces are also available.
4. Data Types
MySQL provides many datatypes to support. It also supports
fixed length and variable length records.
5. Security
MySQL offers a private and password system that is very
flexible and secure, because it allows host based verification.
Passwords are secure because all password traffic encrypted
when you connect to a server.
HARDWARE SPECIFICATION
Processor : 2.16.5 Core i7 (2nd
. and 3rd generation)
Hard Disk : 1TB HHD
RAM : 4GB
CODING
Import mysql.connector
mydb=mysql.connector. connect(host="Localhost", user="root",
password="ram", database="bank")
def openAcc():
n=Input("Enter Name:")
ac-input("Enter Account No:") # Amtul KHAN
db=input("Enter D.0.B.:")
p=input("Enter Phone: ")
ad-input("Enter Address:")
ob=int(input("Enter Opening Balance:"))
data 1 =(n,ac,db,p,ad,ob)
data2=(,ac,ob)
sql1='insert into account values(%S, %S,'%S,%S,%S,%S)"
sql2-'insert into amount values (%S,%S)"
e=mydb. cursor) #Amtul Khan
c. execute(sql1,data 1)
c.execute(sql2,data2)
mydb.commit()
print(" Data Entered Successfully")
main()
def depoAmo(): #Amtul Khan
am=int(input("Enter Amount:"))
acc=int(input(" Enter Account No."))
a="select balance from amount where accno.=%s”
data=(ac,)
c=mydb.cursor()
c.execute(a, data)
myresult=c.fetchone()
tam=myresult|0] + am
def displayacc():
acc=input("Enter Account No.:")
a ="select * from account where accno =%s'"
data-(ac,)
e=mydb.cursor()
c. execute(a,data)
myresult-c.fetchone()
for i in myresult:
print(i,end=" ")
main()
def closeacc():
acc=input("Enter Account No:'")
sql1="delete from account where accno = %s"
sql2="delete from amount where accno =%s"
data=(ac,)
c=mydb.cursor()
c.execute(sql1,data)
c.execute(sqI2, data)
mydb.commit()
main()
1. OPEN NEW ACCOUNT
2. DEPOSIT AMOUNT
3. WITHDRAW AMOUNT
4. BALANCE ENQUIRY
5. DISPLAY CUSTOMER DETAILS
6. CLOSE AN ACCOUNT