Missing details:
The formula for calculating the tip amount is:
tip = cost of meal * (tip percent / 100)
Answer:
In Python:
print("Tip Calculator")
cost_meal = float(input("Enter Cost of Meal: "))
tip_percent = float(input("Enter Tip Percent: "))
tip_amount = cost_meal * tip_percent / 100
total_amount = tip_amount + cost_meal
print("Tip amount: "+str(round(tip_amount,2)))
print("Total amount: "+str(round(total_amount,2)))
Explanation:
This line prints the string "Tip "Calculator"
print("Tip Calculator")
This lime prompts user for cost of meal
cost_meal = float(input("Enter Cost of Meal: "))
This lime prompts user for tip percemtage
tip_percent = float(input("Enter Tip Percent: "))
This line calculates the tip amount
tip_amount = cost_meal * tip_percent / 100
This line calculates the total amount
total_amount = tip_amount + cost_meal
This line prints the tip amount
print("Tip amount: "+str(round(tip_amount,2)))
This line prints the total amount
print("Total amount: "+str(round(total_amount,2)))
Follow these steps to complete the solution