Skip to main content

Tip Calculator

Beginner-friendly

As usual, Mr. Krabs is thinking of new ways to maximize his profits. This time, he wants to implement a tip calculator for his restaurant. However, he lacks the technical skills to develop one, so he has decided to ask for help.

Features

Mr. Krabs wants a very simple tip calculator that meets the following requirements:

  • Prompt the user for the meal price and tip as a percentage.
  • Output a receipt showing the meal price, tip and total price in dollars.

Demo Example

Loading asciinema cast...
note

In this demo example, a Python application was run, but this project is programming language independent. Feel free to use whichever programming language you prefer.

Supporting Resources

Language-independent hints
  • Consider the following formula for calculating the tip:
tip=mealPrice×percentage100\text{tip} = \text{mealPrice} \times \frac{\text{percentage}}{100}
Python-specific resources (including sample solution)

If you are experiencing difficulties, consider taking a look at the sample solution.