Question: # print _ receipt # Parameters: original _ total, discount # Return: none # Side effect: prints a summary of the bill and discount savings
# printreceipt
# Parameters: originaltotal, discount
# Return: none
# Side effect: prints a summary of the bill and discount savings
def printreceiptoriginaltotal, discount:
humanreadablediscount discount;
# TODO : Generate the humanreadable discount from the discount variable,
# eg should be to print a discount
discountprice originaltotal discount
total originaltotal discountprice
# TODO : Fix the formatting of the summary below to print exactly decimal places for each number
# TODO : Check the output and make sure that it makes sense. If not, it means there are bugs still in
the code.
print
print CUSTOMER BILL SUMMARY
printSubtotal: tt $ originaltotal, sep
printhumanreadablediscount, Discount: tt $ discount, sep
printTOTAL AFTER DISCOUNT tt $ total, sep
printYou Saved $ discount, sep
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
