Python Udemy

Day 2

Welcome to the Tip Calculator

print(“WELCOME TO THE TIP CALCULATOR“)

bill = input(“What was the total bill? Rs. “)
tip = input(“How much percent tip do you want to give? %”)
people = input(“How many people to split the bill? “)

bill_int = float(bill)
tip_int = int(tip)
people_int = int(people)

tip = tip_int / 100 * bill_int

total_bill = tip + bill_int
print(total_bill)

bill_per_person = round(total_bill / people_int, 2)

print(f”Each person should pay Rs. {bill_per_person}.”)