Physics, asked by rajputabhijeet0707, 5 months ago

A cloth showroom has announced the following festival discounts on the purchase of items ,based

On the total cost of the items purchased.

Total cost Discount in percentage

Less than 2000 5%

2001 to 5000 25%

5001 to 10000 35%

Above 10000 50%

Write a program to input the total cost and to compute and display the amount to be paid by the customer

after availing discount.​

Answers

Answered by vigneshknv
8

PYTHON program to display the amount to be paid by the customer:

Code:

# Python program to calculate the amount to be paid by the customer

cost = int(input('Total cost of the items purchased:'))

if cost<2000 :

   discount = cost*(5/100)

elif 2001 < cost <= 5000 :

   discount = cost*(25/100)

elif 5001 < cost <= 10000 :

   discount = cost*(35/100)

elif cost > 10000 :

   discount = cost*(50/100)

amount = cost - discount

print('The amount to be paid by the costumer is',amount)

Sample output:

Total cost of the items purchased:20000

The amount to be paid by the customer is 10000.0

Similar questions