Problem 191928 · easy · Phase 01 Prerequisites & Setup

Split the Bill with Tip

input · arithmetic · percentages · rounding · f-strings

Friends are sharing a restaurant bill. Read three lines: the bill amount, the tip percentage (a whole number such as 15), and the number of people. Add the tip to the bill and divide equally. Print:

Each person pays: $<amount>

with the amount shown to exactly two decimal places.

Examples

Input:
120.00
15
4
Output:
Each person pays: $34.50

Constraints

  • 0 <= bill <= 100000, 0 <= tip <= 100, 1 <= people <= 50

Goals

  • Combine several inputs in one formula
  • Add a percentage tip to an amount
  • Print money with two decimals
Starting Python…