user
Task: Reverse engineer this explanation into a proper code

The goal is to design a function to calculate the total amount after discounting the price with the given tax rate.


assistant
def calculateTotalAmount(price, taxRate):
  totalAmount = price - (price * taxRate)
  return totalAmount