def to_gradepoint(grade):
  # write an appropriate and helpful docstring
  """
  convert letter grades into gradepoint
  :param str grade: A, A-, B+, B, B-, C+, C, C-, D, F
  :return: float
  """
  gradepoint = 0 # initial placeholder
  # use conditional statement to set the correct gradepoint
  gradepoint = 4 if grade=='A' else 3.7 if grade=="A-" else 3.3 if grade=="B+" else 3 if grade=="B" else 2.7 if grade=="B-" else 2.3 if grade=="C+" else 2 if grade=="C" else 1.7 if grade=='C-' else 1 if grade=="D" else 0 
  return gradepoint