Question: # print _ receipt # Parameters: original _ total, discount # Return: none # Side effect: prints a summary of the bill and discount savings

# print_receipt
# Parameters: original_total, discount
# Return: none
# Side effect: prints a summary of the bill and discount savings
def print_receipt(original_total, discount):
human_readable_discount = discount;
# TODO 10: Generate the human-readable discount from the discount variable,
# e.g.0.2 should be 20, to print a 20% discount
discount_price = original_total * discount
total = original_total - discount_price
# TODO 11: Fix the formatting of the summary below to print exactly 2 decimal places for each number
# TODO 12: 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 ******")
print("Subtotal: \t\t $, original_total, sep="")
print(human_readable_discount, "% Discount: \t\t -$, discount, sep="")
print("TOTAL AFTER DISCOUNT \t\t $", total, sep="")
print("You Saved ??t??t??t$, discount, sep="")
 # print_receipt # Parameters: original_total, discount # Return: none # Side

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!