input: Write a python function to extract and return prices from a given URL using BeautifulSoup.
  assert extract_prices('https://example.com/product/123') == [29.99, 34.99, 39.99]
  assert extract_prices('https://example.com/product/456') == [19.99, 24.99, 29.99]
  assert extract_prices('https://example.com/product/789') == [14.99, 19.99, 24.99]
output: def extract_prices(url):
      import requests
      from bs4 import BeautifulSoup
  
      response = requests.get(url)
      soup = BeautifulSoup(response.text, 'html.parser')
      
      prices = []
      for price_tag in soup.find_all(class_='price'):
          price_text = price_tag.get_text(strip=True)
          price = float(price_text.replace('$', ''))
          prices.append(price)
      
      return prices