Question: Design a function called get_tax that will calculate and return the tax owed on restaurant charges for food and alcohol. The function should take two
Design a function called get_tax that will calculate and return the tax owed on restaurant charges for food and alcohol. The function should take two floating point values representing the amount of money spent on food and the amount of money spent on alcohol in this order.
The function should calculate and return the total tax owing based on the following rules:
-Restaurants are required to charge 5% GST and no PST on food sales.
-Restaurants are required to charge at 5% GST and 10% PST on alcohol sales.
The function can assume the amount of money owed for both food and alcohol will be $0 or more.
Example:
If the function is called as:
get_tax(28.75, 45.98) it should return the approximate value 8.3345
Do not round the returned value
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
