solve the following program
Answers
Answer:
A program in python:
___________________________
num=int(input("Enter the total number of customers: "))
d={}
for i in range(0,num):
a=[]
name=input("Enter the customer name: ")
tick=int(input("Enter the amount :"))
if tick>70000:
dis=18
elif tick>=55001 and tick<=70000:
dis=16
elif tick>=35001 and tick<=55000:
dis=12
elif tick>=25001 and tick<=35000:
dis=10
elif tick<25001:
dis=2
else:
print("Not a valid amount")
a.extend((name, tick, dis))
d[i]=a
print("\n S.no","\t Name","\t Ticket Charges","\t Discount", "\t Net amount")
for i in d:
print(i+1,"\t", d[i][0],"\t\t", d[i][1],"\t\t",d[i][2],"%", "\t\t",( dis/100)*d[i][1])
(If you're facing any problem refer to the attachment 2)
___________________________
Explanation:
A working program in example: