input: Write a python function to scrape article links and titles from a website.
  assert web_spider(1) == [('http://example.com/tech/article1', 'Article 1 Title'), ('http://example.com/tech/article2', 'Article 2 Title')]
  assert web_spider(2) == [('http://example.com/tech/article1', 'Article 1 Title'), ('http://example.com/tech/article2', 'Article 2 Title'), ('http://example.com/tech/article3', 'Article 3 Title'), ('http://example.com/tech/article4', 'Article 4 Title')]
output: def web_spider(page_num):
      import requests
      from bs4 import BeautifulSoup
  
      base_url = "http://example.com/tech"
      articles = []
  
      for i in range(1, page_num + 1):
          response = requests.get(f"{base_url}/page{i}")
          soup = BeautifulSoup(response.content, 'html.parser')
  
          for article in soup.find_all('article'):
              link = article.find('a')['href']
              title = article.find('h2').get_text()
              articles.append((link, title))
  
      return articles