Exercise to calculate grades