Menu
Coddy logo textTech

Splitting The Bill

Part of the Fundamentals section of Coddy's Python journey — lesson 33 of 77.

challenge icon

Challenge

Beginner

Add to the program a splitting feature:

  1. It will take an additional number (int) from the user that indicates the number of people splitting the bill. (This will be the third input)
  2. Calculate the amount per person by dividing the total amount by the number of people.
  3. In the end, add another print of the amount per person.

Important: Your program should output exactly two numbers:

  • First: the total amount (including tip)
  • Second: the amount per person

Note: For this step, print only the two numeric values (one per line) — no title or labels. You'll add the "Bill Split Calculator" title back, with formatting, in the next lesson.

Try it yourself

print("Bill Split Calculator")

bill_amount = float(input())
tip_percentage = float(input())

tip_amount = (tip_percentage / 100) * bill_amount
total_amount = bill_amount + tip_amount

print(total_amount)

All lessons in Fundamentals