
Need average please
I'm having trouble figuring out how to get the gpa.
In a college, some courses contribute more towards an overall GPA than other courses. For example, a science class is worth 4 points; mathematics is worth 3 points; history is worth 2 points; and English is worth 3 points. The values of the grade letters are as follows, A= 4, B=3, C=2, D=1, F=0. What is the GPA of a student who made a “C” in Trigonometry, a “B” in American History, an “A” in Botany, and a “B” in Microbiology?

you can think of the points as credit hours
take sum(pts*grade)/sum(pts)
= (trig + hist + bot + micr)/13
=( 3*2 + 2*3 + 4*4 + 4*3)/13
= 40/13
= 3.08


GPA = sum((subject credit).(subject grade))/Total Subject credit
= (2.3+3.2+4.4+3.4)/(2+3+4+3) = 40/12 = 3.33