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

Source Code

This document contains source code for a computer sales and service system. The code allows users to purchase computer parts, request services, provide ratings and feedback, and report problems. It uses MySQL to store transaction data in databases tables.

Uploaded by

umangpxhwa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views

Source Code

This document contains source code for a computer sales and service system. The code allows users to purchase computer parts, request services, provide ratings and feedback, and report problems. It uses MySQL to store transaction data in databases tables.

Uploaded by

umangpxhwa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

SOURCECODE

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’)

part=str(input(‘please enter the type of computer part you need:'))


insert="insert into 1_comp_sales
values(""+cust_name+","+str(phno)+","+email+",""+address+","+part+")"
c1.execute(insert)
conn.commit()
print(")
print’ RATING AND COMMENT!) _
rating=int(input(please enterthe ratings out of 10for our software :'))
c
input(‘please
on our softy 4))
print(")
print(")
print(")
ifrating<5:
print(‘sorry for our poor performance next time we will begood enough’)
else:
print(‘thanks for rating us next time wr
insert1="insert into
4
” "+str(rating)+",""+commen
part Will bedelivered

email=str(input(‘please enter your e-mail id ‘))


address=str(input('please enter your residential address.'))
service=str(inpul(‘please enter the service you want:'))
insert="insert into 1_comp_service
values("+name+","+str(phno)+","+email+","+address+",""+service+")"
c1.execute(insert)
ON,
conn.commit()
print(")
print(")
print’ RATINGS AND COMMENT’)
rating=int(input(‘please enter the ratings out of 10 :’))
comment=str(input(‘please comment on our software :'))
print")
if rating<5:
;
print(‘sorry for our poor performance next newe will be good enough’)
else:
print(‘Thanks for rating usnext ti ne|
,"+str(rating)+",""+co1

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
-
.

You might also like