Computer Science, asked by 2013225arnav, 2 months ago

PLS ANSWER THIS QUESTION AND WRITE A RELEVANT ANSWER
IRREVELANT ANSWER=REPORT
OPEN THE ATTACHED FILE BELOW THE QUESTION IS THERE
AND PLS USE PYTHON

Attachments:

Answers

Answered by simonsaikia9
0

Answer:

product_list = {

   "laptop": {

       "price": 36000,

       "discount": 15

   },

   "refrigerator":{

       "price": 15000,

       "discount": 8

   },

   "ac": {

       "price": 30000,

       "discount": 10

   },

   "mobile":{

       "price": 14000,

       "discount": 6

   }

}

getProduct = input("Enter the product name (laptop,refrigerator, ac, mobile) : ")

quantity = int(input("Enter the quantity: "))

if(product_list.get(getProduct)):

   product = product_list.get(getProduct)

   total_amount = product.get("price") *quantity

   print("Total amount: %d"%total_amount)

   discount = total_amount*(product.get("discount")/100)

   print("discount: %d"%discount)

   amount_payable = total_amount -discount

   print("Amount payable: %d"%amount_payable)

else:

   print("Incorrect product name \n Enter the name in lower case")

Similar questions