I've looked online but I'm confused - I need to keep it so that the
following program limits the output to two decimal places since it deals in
currency.
How do I incorporate that into my current code below? The textbook I'm
using doesn't describe how to do that. Thanks in advance.
#Challenge Chapter 2
#Question number three
print("This program helps you to determine a tip amount of either")
print("15 or 20 percent.")
bill=float(input("\nHow much was your restaurant bill total (in dollars)?
"))
fifteen=float(bill*0.15)
twenty=float(bill*0.2)
print("\n15% tip = $", fifteen)
print("\n20% tip = $", twenty)
input("\n\nPress the enter key to exit.")
_______________________________________________
Tutor maillist - [email protected]
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor