input: Write a function to scrape an online news website to get the headlines. The function should take a URL as input, retrieve the page content, parse it using BeautifulSoup, find all the headlines in the form of h2 tags, and print them.
  
  assert scrape_news("https://www.news.com/") is None
  assert scrape_news("https://www.fakewebsite.com/") is None
output: import requests
  from bs4 import BeautifulSoup
  
  def scrape_news(url):
      try:
          response = requests.get(url)
          response.raise_for_status()
          soup = BeautifulSoup(response.text, 'html.parser')
          headlines = soup.find_all('h2')
          for headline in headlines:
              print(headline.text)
      except:
          pass