0% found this document useful (0 votes)
9 views

Python Source Code (1)

Uploaded by

movoho9071
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

Python Source Code (1)

Uploaded by

movoho9071
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

PYTHON SOURCE CODE

print("****BANK TRANSACTION****")
#creating database
import mysql.connector
mydb=mysql.connector.connect(host="localhost",user="root",
passwd="2809")
mycursor=mydb.cursor()
mycursor.execute("create database if not exists bank")
mycursor.execute("use bank")
#creating required tables
mycursor.execute('''create table if not exists bank_master(acno char(4)
primary key,name varchar(30),city char(20),mobileno
char(10),balance int(6))''')
mycursor.execute("create table if not exists banktrans(acno char
(4),amount int(6),dot date,ttype char(1),foreign key (acno) references
bank_master(acno))")
mydb.commit()
while True:

print("1=Create account")
print("2=Deposit money")
print("3=Withdraw money")
print("4=Display account")
print("5=Exit")
ch=int(input("Enter your choice:"))

#PROCEDURE FOR CREATING A NEW ACCOUNT OF THE


APPLICANT

You might also like