define grade_to_gpa() function, modify some errors in test_exercise1