Part 02 / Topic 10 of 10
Putting it together: restaurant bill splitter
See examples/06_bill_splitter.py. Short version:
subtotal = 2450
gst = subtotal * 0.05 # 5% GST on restaurant food
tip = subtotal * 0.10 # 10% tip
total = subtotal + gst + tip
people = 4
print(f"Total : ₹{total:,.2f}") # Total : ₹2,817.50
print(f"Per person: ₹{total / people:,.2f}") # Per person: ₹704.38
Done here? The practice set for Part 2 — 8 exercises with solutions — is on the part page.