Question: Steve is attempting to write a function that takes a price and a boolean value indicating whether to add tax. The value of the boolean

Steve is attempting to write a function that takes a price and a boolean value indicating whether to add tax. The value of the boolean will determine whether or not you add a tax to the price. If the boolean value is true, we will add an 8% tax to price and then return the total. If the boolean value is false, we will just return the price.
The function that Steve has written has some errors. Fix the errors in order to ensure that the function is doing what the question is asking for.
Name Type Description
add_tax python function Function takes a price and a boolean value indicating whether to add 8% tax to the price. Depending on the boolean value, the function will return the price with the tax added on top or just the price.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!