logo

Tip Calculator

100 Days of Code: The Complete Python Pro Bootcamp Day 2.


My code:


print("Welcome to the tip calculator!")
bill = float(input("What was the total bill? "))
tip = float(input("How much tip would you like to give? 10%, 12% or 15%: "))
people = float(input("How many people to split the bill? "))
tip_procent = float(tip /100)
total = float(((bill * tip_procent)+bill)/people)
print("Each person should pay $" + str(total))