Create a Python script which will compute the TOTAL Sales in a Grapes Store. The grapes is sold at 235.75 per kilo. 5% discount is given to customers that will buy 5 kilos and above. Compute also the CHANGE after the customer tendered their money. Format the display with two decimal digits.
Sample Output 2:
GRAPE STORE
No. of Kilos: 3
Total Price: 707.25
Discount: 0.00
Discounted Price: 707.25
CASH: 1000
Change: 292.75
from dis import disco
COST = 235.75
DISCOUNT = 5
DISCOUNT_KILOS = 5
print('GRAPE STORE')
kilos = float(input('No. of Kilos: '))
tot_price = round(kilos * COST, 2)
if kilos >= DISCOUNT_KILOS:
discount = tot_price * DISCOUNT / 100
discount = round(discount, 2)
else:
discount = 0
discount_price = tot_price - discount
print(f'Total Price: {tot_price:.2f}')
print(f'Discount {discount:.2f}')
print(f'Discount Price: {discount_price:.2f}')
cach = float(input('CACH: '))
change = cach - discount_price
print(f'Change: {change:.2f}')
Comments
Leave a comment