input: Write a python function to get the status code of a given URL.
  assert get_status_code('http://example.com/')==200
  assert get_status_code('http://nonexistenturl.com/')==404
output: import requests
  
  def get_status_code(url):
      try:
          response = requests.get(url)
          return response.status_code
      except requests.exceptions.RequestException:
          return 404