% Grade Calculator Script for Math 141A


HW = [15 14 18 18 18 18 18 18 18]; %put your scores in here!
MT1 = 126; %midterm scores
MT2 = 126; %midterm scores

Final = 150; %put what you think you will get on the final here
             %note: for percentage divide by 200
Pres = 9; %presentation score out of possible 10 (averaged across 3 categories)

MT_max = max([MT1,MT2]);%takes max of Midterms 1 and 2 for scheme 2
             
             
HWs = sort(HW); %sort hw
HWa = mean(HWs(3:9)); %drop lowest 2 HW and find average

Grade_s1 = (Pres/10)*.05 + (HWa/20)*(.22) + (MT1/150)*0.21 + (MT2/150)*0.21 + (Final/200)*0.31


Grade_s2 = (Pres/10)*.05 + (HWa/20)*(.22) + (MT_max/150)*0.21  + (Final/200)*0.52


Final_grade = max(Grade_s1,Grade_s2) 
