Source Code
Source Code
importmysql.connector as sql
conn=sq|.connect(host="localhost" user="root"passwd="manager" database="test")
ifconn.is_connected():
print(‘successfully connected’)
c1=conn.cursor()
c1.execute('use test’)
ctecomneino)
print(")
print(")
print(’
COMPUTER SALES AND SERVICE SYSTEM)
print(")
print(")
print('1.to buy computer parts’)
print('2.to ask for computer s 2
eh
_COMPUTER SALES’)
print(”)
prnt(")
print(’1 problem with sales’)
print(’2 problem with service’)
print(’3 problem with dordelivary boy or service boy’)
print(")
a=int(input(‘please enter your choice:’))
print(")
if a==
cus_name=str(input(‘please enter your name:’))
phno1=in\(inputtplease enter your phone no:’))
sa_name=str(input(‘please enter the name of the sales boy whom you dealed with:'))
prob=str(input(‘please enter your problem:’))
print(")
print’
sorry for the problem sire/madam we will ensure that this does not happen
next time thank you’)
insert2="insert into
sales_probvalues(""+cus_name+","+str(phno1)+","+sa_name+™,"+prob+™)"
c1 execute(insert2)
conn commit()
if a==2:
cus_name=str(input(‘please enter your name ‘))
phno1=int(input(‘please enter your phone no’’))
se_name=str(input(‘please enter the name of the service boy you dealed with.’))
prob=str(input(‘please enter the problem you face"’))
print(")
print(’
sorry for the problem sire/madam wewill ensure that this does not happen
next time. thank you')
insert2="insert into
servive_probvalues("+cus,pamie+","+str(phnot)*"“+se_names"."*Pr00*")"
C1 execute(insert2)
conn.commit()
az=3:
cus_name=str(input(‘please enter your name:’))
phno1=int(input(‘please enter your phone no:’))
name1=str(input(‘please enter the boys name’’))
you have faced’)
insert2="insert jato
sb_probvalues(""+cus_name+","+str(phno1)+","+name1+","+prob+")"
ci execute(insert2)
conn.commit()
print(")
print(’
prob=str(input('please enter _
sorry for the problem sir/madam we see to it that the boy gets penalized
severely.thank you’)
if choice==4.
l="select * from rating comment"
c1.execute(l)
a=c1 a
-
.