Menu
CoddyTech

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: keep the Bill Split Calculator title line from the starter code, then print two numbers, one per line:

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

Try it yourself

print("Bill Split Calculator")

bill_amount = float(input())
tip_percentage = float(input())
num_people = int(input())

# Calculate tip amount
# Calculate total amount
# Calculate amount per person

# Print total amount
# Print amount per person

All lessons in Fundamentals

Practice on your own: Online Python compiler