100 Days of code (Python course by Angela) Project 2
Project Name: Advance Tip Calculator
Introduction:
Welcome to the Tip Calculator, a user-friendly Python project designed to streamline the process of splitting bills and calculating tips among a group of people. With this powerful tool, you can easily determine the total bill, allocate individual shares, and calculate the appropriate tip based on your preferences.
Source code:
print("Welcome to the tip calculator.")
total_bill = int(input("What was the total bill? $"))
number_of_people = int(input("How many people to split the bill? "))
tip_percentage = int(input("What percentage tip would
you like to give? 10%, 12%, or 15%, 20%: "))
total_tip = tip_percentage/100*total_bill
share_per_head = (total_bill+total_tip)/number_of_people
print(f'Each person should pay: ${round(share_per_head , 2)}')
tip_per_head = total_tip / number_of_people
print(f'Each person pay ${round(tip_per_head , 2)} tip. ')