Averages and percentiles
A weighted mean multiplies each score by its weight, and the median holds steady when an outlier drags the mean.
A worked example
Coursework worth 40% at 55 and an exam worth 60% at 90 give 0.4(55) + 0.6(90) = 76.
The mistake people actually make
A percentile is the percent of the group at or below a score, not a mark out of 100. Put the values in order before reading off a median.