import string


def name_to_url(query):
  """convert query to correct url

  Args:
      query (str): search term

  Returns:
      url (str): correct url
  """  
  query = query.translate(str.maketrans('', '', string.punctuation))
  query = query.replace(" ", "%20")
  search = 'https://medium.com/search?q=' + query

  return search