A simple tip claculator using python:-


 print("Welcome to the tip calculater:-")
bill = float(input("What is the bill:- $"))
per = int(input("What percentage of tip you want to give?:-"))
up_per = per / 100
tip = bill * up_per
total_bill = bill + tip
total_amount = round(total_bill,2)
print(f"The total bill is ${total_amount}")
split = int(input("How many persons to split the bill:-"))
split_amount = total_bill / split
final_amount = round(split_amount,2)
print(f"Each person have to pay ${final_amount}")

Comments

Popular posts from this blog

Definition of HTML

Definition of Resistor: