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

Source Code

Uploaded by

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

Source Code

Uploaded by

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

SOURCE CODE

import mysql.connector as sql

conn=sq1.connect(host= 'localhost' ,user=


'root' ,passwd= 'manager',
database='courier_service_system2')

custl=conn.cursor()

print('WELCOME TO BATMAN COURIER SERVICE:')

print('Hi')

o=input('Press enter to begin your courier surfing')

print('1.CREATE YOUR COURIER SERVICE ACCOUNT')

print('2.LOGIN')

choose=int(input('ENTER (1) FOR NEW ACCOUNT OR (2)


FOR LOGIN:'))

if choose==1:

name=input('Enter your user-name:')

passwd=input('Set your password here:')

passwdl=input('Confirm password:')

custl.execute("INSERT INTO login VALUES('


"+name+" ','

"+passwd+" ')')

conn.commit()

print('ACCOUNT CREATED CONGRATULATIONS')

move_in=input('press enter to login:')

import B_COURIER_MENU
elif choose==2:

email=input("Enter your email-id")

passd=input('Enter your PASSWORD:')

custl.execute('select * from login where


user_name= '+email+' and password='+passd+'')

if custl.fetchone() is None:

print('sorry your password in wrong')

else:

import B COURIER MENU

B COURIER MENU:

import mysql.connector as sql

conn=sql.connect(host= 'localhost' ,user=


'root' ,passwd='manager', database='courier service
system2')

custl=conn.cursor()

for i in range(0,76):

print ("WELCOME TO BATMAN COURIER SERVICE:")

print('l.Courier_order and customer_details')

print('2.billing procedure')

print('3.courier service boys')

print('4.exit')

choice=int(input('Enter the section you want to


access:...(1,2,3 or 4)..:'))
if choice==1:

print('A.courier placement')

print('B.courier order list')

sect=str(input("enter the section that you


want to access:"))

if sect=="A":

print('COURIER-ORDER')

a=(input('enter the customer name:')

b=int(input("enter the customer mobile


number:"))

c=(input("enter the customer address:"))

d=(input('enter the receiver name:'))

e=int(input('enter the receiver mobile


number:'))

f=(input('enter the receiver address:'))

custl.execute ("INSERT INTO couriers


VALUES(' "+a+"','+"str(b)+","+c+ ',' "+d+" ',"+str(e)
+",' "+f+" ')")

conn.commit ()

print (custl.rowcount, 'courier (s)


placed')

print('==============================================
=====================================================
==================================')

elif sect=="B":

S=str(input('do you want to see your courier


order' "(yes...\..no):"))
if S=="yes":

a=input ('enter the customer mob number:')

custl.execute('select * from couriers where


customer mobile number="{}" ' . format (a) )

order=custl1.fetchall ()

print ('customer name,',"customer mob


no,","customer address,","receiver name,","receiver
mob no,",'receiver address:')

for j in order:

print (j)

print('==============================================
=====================================================
=====================================================
===============')

else:

print('Thank You')

print('==============================================
=====================================================
=====================================================
===============')

elif choice==2:

print ("BILLING PROCEDURE:[weight in kgs cost in


rupees]")

custl.execute ("select * from couriers2")

bill=custl1.fetchall()

for x in bill:

print(x)

print('==============================================
=====================================================
=====================================================
===============')

if choice==3:

cityl=input ("enter your city name:")

custl.execute("select * from couriers3 where


city='{}'". format (cityl1) )

boys=cust1.fetchall()

print(" City courier boy


courier boy mobile no:")

for y in boys:

print(y)

print('==============================================
=====================================================
=====================================================
===============')

elif choice==4:

quit()

You might also like