input: Write a function to create a web scraper that extracts specific data from a given website using the Python package BeautifulSoup. The function should utilize BeautifulSoup to parse webpages and extract the required data by finding HTML elements using tags and attributes, convert the data into the desired format, and store it. If the website is inaccessible or the required data is not found, the function should return an appropriate error message.
  
  assert extract_data("https://example.com/links") == ["https://link1.com", "https://link2.com", "https://link3.com"]
  assert extract_data("https://example.com/no_links") == "No links found."
  assert extract_data("https://nonexistent.com") == "Website is inaccessible."
output: def extract_data(url):
      try:
          import requests
          from bs4 import BeautifulSoup
          response = requests.get(url)
          if response.status_code != 200:
              return "Website is inaccessible."
          soup = BeautifulSoup(response.content, 'html.parser')
          links = soup.find_all('a', href=True)
          if not links:
              return "No links found."
          return [link['href'] for link in links]
      except Exception:
          return "Website is inaccessible."