input: Write a function to scrape an online news website to get the headlines. The function should take a URL as input, send a GET request to the URL, use BeautifulSoup to parse the HTML content, and find all h2 elements which generally contain the headlines. The function should then print each headline.
  assert scrape_headlines("https://www.news.com/")==None
  assert scrape_headlines("https://www.anothernews.com/")==None
  assert scrape_headlines("https://www.fakenews.com/")==None
  assert scrape_headlines("https://www.breakingnews.com/")==None
  assert scrape_headlines("https://www.dailynews.com/")==None
output: import requests
  from bs4 import BeautifulSoup
  
  def scrape_headlines(url):
      response = requests.get(url)
      soup = BeautifulSoup(response.content, 'html.parser')
      headlines = soup.find_all('h2')
      for headline in headlines:
          print(headline.text)