input: Write a function to create a web scraper in Python that retrieves the latest stock prices from specific websites. The function should take a list of stock names as input, scrape the corresponding stock prices from the Yahoo Finance website, and print each stock's name along with its price.
  
  
  import requests
  from bs4 import BeautifulSoup
  
  # function definition
  def get_stock_price(stock):
      url = f"https://finance.yahoo.com/quote/{stock}"
      response = requests.get(url)
      soup = BeautifulSoup(response.text, 'html.parser')
      price = soup.find('div', {'class': 'My(6px) Pos(r) smartphone_Mt(6px)'}).find('span').text
      return price
  
  # test cases
  assert get_stock_price("AAPL stocks") == "170.33"  # Example price, actual price may vary
  assert get_stock_price("MSFT stocks") == "312.88"  # Example price, actual price may vary
  assert get_stock_price("FB stocks") == "377.50"    # Example price, actual price may vary
  assert get_stock_price("GOOG stocks") == "2847.25"  # Example price, actual price may vary
  
output: def get_stock_price(stock):
      url = f"https://finance.yahoo.com/quote/{stock}"
      response = requests.get(url)
      soup = BeautifulSoup(response.text, 'html.parser')
      price = soup.find('div', {'class': 'My(6px) Pos(r) smartphone_Mt(6px)'}).find('span').text
      return price