#function passed a class grade (ABCDF) and credit, return the GPA points def credit_pts (grade, credits): if grade == 'A': points = credits * 4 elif grade == 'B': points = credits * 3 elif grade == 'C': points = credits * 2 elif grade == 'D': points = credits elif grade == 'F': points = 0; return points #******************************* ''' if 1234 == '1234': #string and number never equal print('yes') else: print('no') ''' gr = input("Enter a grade ABCDF: ") creds = eval(input("Enter the credits: ")) pts = credit_pts(gr, creds) print("Points =", pts) #print(asdf)