Challenge: Optional ArgumentsChallenge: Optional Arguments

Task

You have to write a function that calculates the total cost of some product based on the information about its price, quantity, discount and tax_rate. Take into account that discount and tax_rate are optional parameters and must have default values.

  1. Set the default value of the discount argument equal to 0.
  2. Set the default value of the tax_rate argument equal to 0.1.
  3. Calculate the cost with default discount and tax_rate equals 0.15.
  4. Calculate the cost with default tax_rate and discount equals 0.2.

Everything was clear?

Section 2. Chapter 2
toggle bottom row