input: Write a function to scrape the title and content from the homepage of a given website using Python. The function should take a URL as input and print the title and content of the page if available. If the page does not contain a title or content, the function should handle these cases appropriately.
  url = 'https://www.example.com'
  assert scrape_webpage(url)
  # Example output:
  # Title: Example Domain
  # Content: This domain is for use in illustrative examples in documents. You may use this domain in literature without prior coordination or asking for permission.
  assert scrape_webpage('https://www.nonexistentwebsite.com')==None
output: def scrape_webpage(url):
      try:
          import requests
          from bs4 import BeautifulSoup
          response = requests.get(url)
          response.raise_for_status()
          soup = BeautifulSoup(response.text, 'html.parser')
          title = soup.title.string if soup.title else "No title found"
          content = soup.get_text().strip() if soup.get_text() else "No content found"
          print(f"Title: {title}")
          print(f"Content: {content}")
      except Exception as e:
          return None