Computer Science, asked by vikranth98h, 1 year ago

ARS Gems Store sells different varieties of gems to its customers. Write a Python program to calculate the bill amount to be paid by a customer based on the list of gems and quantity purchased. Any purchase with a total bill amount above Rs.30000 is entitled for 5% discount. If any gem required by the customer is not available in the store, then consider total bill amount to be -1. Assume that quantity required by the customer for any gem will always be greater than 0. Perform case-sensitive comparison wherever applicable.

Answers

Answered by 111soul111
0

Hey Random User➰➰

Here is your answer⤵⤵

》a=int(input)

b=a×5/100

Total=b

print(b)

Answered by surajphulari2930
0

def calculate_bill_amount(gems_list, price_list, reqd_gems, reqd_quantity):

bill_amount = 0

for i in range(0, len(reqd_gems)):

if (reqd_gems[i] in gems_list) and reqd_quantity[i] > 0:

for j in range(0, len(gems_list)):

if gems_list[j] == reqd_gems[i]:

price = price_list[j]

break

bill_amount = bill_amount + (price) * reqd_quantity[i]

bill_amount_amt = bill_amount - (5 / 100) * bill_amount

else:

bill_amount = -1

break

return bill_amount

Similar questions