Create discount function

finds discounted price and returns value