For the midterm, I used the following awk script to convert the midterm score into one out of 100. Your score is i:
top = 34
a = 29
b = 24
c = 21
d = 16
if (i >= a) {
score = ((i-a)/(top-a)*12.5+87.5);
} else if (i >= b) {
score = ((i-b)/(a-b)*12.5+75);
} else if (i >= c) {
score = ((i-c)/(b-c)*13+62);
} else if (i >= d) {
score = ((i-d)/(c-d)*12+50);
} else {
score = (i/(d)*50);
}
printf "Question Midterm : %.2f / 20\n", score*.20
printf " Actual midterm grade (out of 38): %.1f Out of 100: %.1f\n", \
i, score
}
On the final, same algorithm, starting with:
top = 40 a = 32 b = 24 c = 17 d = 13The midterm is then multiplied by .20 and the final by .25, and your scores for the lab, midterm and final are summed to get a number out of 100. Your grade is then assigned using the scale above.