Professional Documents
Culture Documents
PAGE- 1
INDEX
3. OUTPUT 23-26
4. BIBLIOGRAPHY 27
PAGE- 2
INTRODUCTION
ABOUT PYTHON:
Python is an interpreted, object-oriented, high-level
programming language with dynamic semantics. Its
high-level built in data structures, combined with
dynamic typing and dynamic binding, make it very
attractive for Rapid Application Development, as well
as for use as a scripting or glue language to connect
existing components together. Python's simple, easy
to learn syntax emphasizes readability and therefore
reduces the cost of program maintenance. Python
supports modules and packages, which encourages
program modularity and code reuse. The Python
interpreter and the extensive standard library are
available in source or binary form without charge for
all major platforms, and can be freely distributed.
PAGE- 3
incredibly fast. Debugging Python programs is easy: a
bug or bad input will never cause a segmentation
fault. Instead, when the interpreter discovers an
error, it raises an exception. When the program
doesn't catch the exception, the interpreter prints a
stack trace. A source level debugger allows inspection
of local and global variables, evaluation of arbitrary
expressions, setting breakpoints, stepping through
the code a line at a time, and so on. The debugger is
written in Python itself, testifying to Python's
introspective power. On the other hand, often the
quickest way to debug a program is to add a few print
statements to the source: the fast edit-test-debug
cycle makes this simple approach very effective.
PAGE- 4
ABOUT MYSQL:
MySQL is a fast, easy-to-use RDBMS being used for many small and big
businesses. MySQL is developed, marketed and supported by MySQL
AB, which is a Swedish company. MySQL is becoming so popular
because of many good reasons −
• MySQL works very quickly and works well even with large data
sets.
PAGE- 5
increase this (if your operating system can handle it) to a
theoretical limit of 8 million terabytes (TB).
PAGE- 6
SOURCE CODE
import random
import mysql.connector
import pandas as pd
db=mysql.connector.connect(host='localhost',username='root',password='sawan',database=
'datacamp')
cursor=db.cursor()
ctr=0
bank=1
while bank==1:
print('+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+--')
print('>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>')
choice=int(input("Option :- "))
print('*******************************************')
PAGE- 7
if choice==1:
def welcome_message():
print('\t\t\t>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>')
print('\t\t\t>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>')
def login():
while True:
print('>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>')
value=(us,p)
password=%s """
cursor.execute(query,value)
data_login=cursor.fetchall()
if len(data_login)!=0:
globals()['ctr']=1
break
else:
print('LOGIN UNSUCCSESSFUL')
PAGE- 8
print("USERNAME OR PASSWORD IS WRONG")
print('>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>')
return data_login
def interface():
welcome_message()
b=login()
if globals()['ctr']==1:
i=b[0][0]
name=b[0][2]
print("LOGIN SUCCESSFUL")
print('++++++++++++++++++++++++++++++++++++++++++++\n')
c=1
while c==1:
print('>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>')
PAGE- 9
ch=int(input("Enter your option :- "))
if ch==1:
print('>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>')
db.commit()
username=%s'
cursor.execute(q,(i,name))
a=cursor.fetchall()
a=a[0]
for x in a:
print('>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>')
elif ch==2:
money_withdrawn=int(input('Amount to be withdrawn
:- '))
print('>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>')
%s where id=%s',(money_withdrawn,i))
PAGE- 10
db.commit()
username=%s'
cursor.execute(q,(i,name))
a=cursor.fetchall()
a=a[0]
for x in a:
print('>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>')
elif ch==3:
username=%s'
cursor.execute(q,(i,name))
a=cursor.fetchall()
a=a[0]
for x in a:
condition=x
if condition=='false':
PAGE- 11
print('Press 2 for Voter Id Card')
print('>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>')
print('>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>')
if cho==1:
db.commit()
print("KYC Done")
elif cho==2:
db.commit()
print("KYC Done")
elif cho==3:
PAGE- 12
cursor.execute('update customers set
db.commit()
print("KYC Done")
elif ch==4:
db.commit()
print("KYC Done")
else:
print('Wrong Choice')
else:
print('____________________________________________')
elif ch==4:
username=%s'
cursor.execute(q,(i,name))
a=cursor.fetchall()
PAGE- 13
a=a[0]
for x in a:
print("Balance :- ",x)
print('>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\n\n')
elif ch==5:
c=0
else:
print('>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\n\n')
interface()
elif choice==2:
idea=random.randint(1,100)
PAGE- 14
acno=random.randint(500000000000,1000000000000)
print('---------------------------------------\n')
kyc='false'
value=(idea,name,username,pas,balance,age,gender,kyc,Account_no)
cursor.execute(query,value)
db.commit()
elif choice==3:
print('------------------------------------\n')
value=(us,p)
cursor.execute(query,value)
data_login=cursor.fetchall()
username=%s',(data_login[0][0],data_login[0][2]))
db.commit()
elif choice==4:
PAGE- 15
cursor.execute(i)
i=cursor.fetchall()
df = pd.DataFrame(i)
print(df)
elif choice==5:
print('==================================================\n\n')
elif choice==6:
bank=0
else:
print('Wrong Option')
print('==========================================')
PAGE- 16
OUTPUT
PAGE- 17
PAGE- 18
PAGE- 19
PAGE- 20
BIBLIOGRAPHY
BOOKS:
WEBSITE: WWW.PYTHON.ORG
WEBSITE: WWW.WIKIPEDIA.ORG
PAGE- 21