input: Write a function to calculate the discount given a purchase price and a discount rate.
  assert calculate_discount(100, 10) == 10.0
  assert calculate_discount(200, 15) == 30.0
  assert calculate_discount(50, 5) == 2.5
output: def calculate_discount(purchase_price, discount_rate):
      return (purchase_price * discount_rate) / 100