Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Meal Cost Calculation
- mealCost = input('Enter the cost of your meal:' + '\n$') #Meal Cost
- tax = float(mealCost) * float(0.07) #Meal Tax
- tip = float(mealCost) * float(0.15) #Meal Tip
- totalMealCost = float(mealCost) + float(tip) + float(tax) #Meal Total Cost
- print('\n'
- + 'The initial cost of your meal:' + '\n$' + str(float(mealCost)) + '\n' + '\n'
- + 'The tax amount:' + '\n$' + str(float(format(tax, '.2f'))) + '\n' + '\n'
- + 'The tip amount:' + '\n$' + str(float(format(tip, '.2f'))) + '\n' + '\n'
- + 'The total cost of your meal:' + '\n$' + str(float(format(totalMealCost, '.2f'))))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement