In: Computer Science
Python/Thonny - In an office chair store, 3 types are sold: basic, standard and luxury. In addition there are normal customers and frequent customers. The price of the chairs is: Basic $ 700.00 each Standard $ 900.00 each Luxury $ 1,500.00 each The store owner has decided to give a 20% discount to frequent customers. In addition, it has decided to apply the following wholesale discount policy to normal customers: If your purchase is> = $ 10,000 and <$ 20,000 a 10% discount if your purchase is> = $ 20,000 a 15% discount Write a program that asks the type of chair, the type of customer and the quantity to buy (suppose that only one type of chair is to be purchased) and calculate and show: the price before applying discount, the amount of money granted by discount and The total to be paid by the customer.
chairType = input("Enter type of chair (basic, standard or luxury): ") customerType = input("Enter type of customer (frequent or normal): ") quantity = int(input("Enter quantity to buy: ")) price = 0 discount = 0 if(chairType=="basic"): price = quantity*700 elif(chairType=="standard"): price = quantity*900 else: price = quantity*1500 print("Price before applying discount =",price) if(customerType=="frequent"): discount = price*0.20 else: if(price>=10000 and price<=20000): discount = price*0.10 elif(price>=20000): discount = price * 0.15 price = price - discount print("Amount of money granted by discount =",discount) print("The total to be paid by the customer =",(price-discount))