-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbilling_system_for_bhatbhateni.py
More file actions
81 lines (66 loc) · 2.57 KB
/
billing_system_for_bhatbhateni.py
File metadata and controls
81 lines (66 loc) · 2.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# Initial Display
def initial_display():
display='''
Sunway Bhatbhateni Store
Maitidevi,Kathamndu
*************************************************************************'''
print(display)
# Calculates the discount and total net price to be paid by customer
def calculation(total_price):
if(total_price<=5000):
discount= total_price*0.05
discount_amount=total_price-discount
elif(total_price<=5000 and total_price>=7000):
discount=total_price*0.08
discount_amount=total_price-discount
elif(total_price<=10000):
discount=total_price*0.1
discount_amount=total_price-discount
elif(total_price>=10000):
discount=total_price*0.15
discount_amount=total_price-discount
else:
print("Thank you!!")
return discount_amount
# Displays the bill by taking all the vitals as parameters
def display_information(cust_name,cust_add,cust_phn,cust_email,prize,net):
print(f'''
Customer name={cust_name}
''')
print(f'''
Customer address:{cust_add}\t Customer phone number={cust_phn}
''')
print(f'''
Customer email:{cust_email}\t Total price={prize}
''')
print(f'''
Discount:{prize-net}\t Net Total amount={net}
''')
# Takes the information about the Customer
def infromation_display():
Cust_no=(int(input("Enter a number of Customer: ")))
cust_name=[]
cust_add=[]
cust_phn=[]
cust_email=[]
Total_Prize=[]
net_total=[]
for i in range(Cust_no):
total_price=0
cust_name.append(input(f"Enter a customer name[{i+1}]: "))
cust_add.append(input(f"Enter a customer address[{i+1}]: "))
cust_phn.append(input(f"Enter a customer phone number[{i+1}]: "))
cust_email.append(input(f"Enter a customer email[{i+1}]: "))
item_no=int(input(f"Enter a number of item: "))
for j in range(item_no):
quantity=int(input(f"Quantity of item[{j+1}]: "))
unit_price=int(input(f"Unit price of item[{j+1}]: "))
total_price=total_price+(quantity*unit_price)
print (total_price)
Total_Prize.append(total_price)
net=calculation(Total_Prize[i])
net_total.append(net)
for i in range(Cust_no):
initial_display()
display_information(cust_name[i],cust_add[i],cust_phn[i],cust_email[i],Total_Prize[i],net_total[i])
infromation_display()