Create a Python script which will compute the TOTAL Sales in 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:
GRAPE STORE:
No. of Kilos: 6
Total Price: 1414.50
Discount: 70.73
Discounted Price: 1343.77
CASH: 1500
Change: 156.23
I need the code to have an output stated above.
print('Enter the Number Of Kilos:')
no_kilos = int(input())
if no_kilos>=5:
price= no_kilos*235.75
discount= round((0.05*price),2)
disc_price=price-discount
print('GRAPE STORE:')
print('No. of Kilos:', no_kilos)
print('Total Price:', price)
print('Discount:', discount)
print('Discounted Price:', disc_price)
print('Enter the Cash Amount:')
cash = int(input())
change = cash-price
print('Cash:', cash)
print('Change:', change)
else:
price= no_kilos*235.75
print('GRAPE STORE:')
print('No. of Kilos:', no_kilos)
print('Total Price:', price)
print('Enter the Cash Amount:')
cash = int(input())
change = cash-price
print('Cash:', cash)
print('Change:', change)
Comments
Leave a comment