input: Write a function to create a web scraper that retrieves the 10 most recent articles from a given news website URL. The function should use Python and the BeautifulSoup library to parse the HTML content and extract the articles. If the URL is invalid or the website does not contain any articles, the function should print an appropriate error message.
  import requests 
  from bs4 import BeautifulSoup 
    
  def scrape_recent_articles(URL):
      try:
          html_content = requests.get(URL).text 
          soup = BeautifulSoup(html_content, "lxml") 
          articles = soup.find_all('article') 
          if len(articles) == 0:
              print("No articles found on the website.")
          else:
              for article in articles[:10]: 
                  print(article.text)
      except:
          print("Invalid URL or unable to retrieve the webpage.")
  
  assert scrape_recent_articles('http://example.com/news')==None
  assert scrape_recent_articles('http://invalidurl.com')==None
  assert scrape_recent_articles('')==None
output: 
  def scrape_recent_articles(URL):
      try:
          html_content = requests.get(URL).text 
          soup = BeautifulSoup(html_content, "lxml") 
          articles = soup.find_all('article') 
          if len(articles) == 0:
              print("No articles found on the website.")
          else:
              for article in articles[:10]: 
                  print(article.text)
      except:
          print("Invalid URL or unable to retrieve the webpage.")
  