Complete the function, which calculates how much you need to tip based on the total amount of the bill and the service.
You need to consider the f...
For further actions, you may consider blocking this person and/or reporting abuse
calculatetip(78, "good") => 8
calculatetip(50, "poor") => 3
calculatetip(125, "excellent") => 25
Here is the Python solution:
Python 3
Try it online!
Haskell
Implementation in Frink