You are here: UUCS>TC Web>CourseGrading (10 Nov 2013, JohanJeuring)
The course grade is determined by grades on practicals and tests. There are 3 practicals (`p1`, `p2`, and `p3`) and 2 tests (`t1` and `t2`). There is an optional resit test (`t_new`, during the herkansing halfway through the next period) which may replace one grade such that your resulting course grade is the maximum of all possible grades. Each part of the course has a "weight" defined as the fraction of the course grade. The course grade is calculated by the weighted sum of all parts. See the formula below or download the Haskell source for the actual calculation.

• If one of the 5 grades is missing, no grade will be given. The course is considered "incomplete."
• No literature or other resources are allowed during the tests.
• The course grade is rounded in the normal fashion: `round 5.5 = 6` and `round 5.49 = 5`

```-- Weighted sum: Each part of the course has a "weight" defined as the fraction
-- of the course grade (0 is nothing and 1 is 100%). The course grade is
-- calculated by the weighted sum of all parts.

weighted_sum :: [(Double, Double)] -> Double
weighted_sum = foldl' (\sm (wt, gr) -> sm + wt * gr) 0

-- Average practical grade: The first practical is worth 10% of the course
-- grade. The second 15%, and the third 25%. The maximum average practicum

p_average :: Double -> Double -> Double -> Double
p_average p1 p2 p3 = weighted_sum [(0.1, p1), (0.15, p2), (0.25, p3)]

-- Average test grade: The first test is 20%, and the second is 30%. The maximum
-- average test grade is 5.

t_average :: Double -> Double -> Double
t_average t1 t2 = weighted_sum [(0.2, t1), (0.3, t2)]

-- Course grade at the end of the period: If both the practical and the test
-- average grades are at least half the maximum average, then the course grade
-- is the sum of the averages. Otherwise, the course grade is the minimum of the
-- practical and the test grade.

course_grade :: Double -> Double -> Double -> Double -> Double -> Double
course_grade p1 p2 p3 t1 t2
| p >= 2.5 && t >= 2.5 = p + t
| otherwise            = min p t
where
p = p_average p1 p2 p3
t = t_average t1 t2

-- Course grade after the resit test ("aanvullende toets"): The course grade
-- after the resit test is the maximum possible grade where the resit test grade
-- is substituted for one of the practical or test grades.

resit_course_grade :: Double -> Double -> Double -> Double -> Double -> Double -> Double
resit_course_grade p1 p2 p3 t1 t2 t_new =
maximum [ course_grade  t_new  p2     p3     t1     t2
, course_grade  p1     t_new  p3     t1     t2
, course_grade  p1     p2     t_new  t1     t2
, course_grade  p1     p2     p3     t_new  t2
, course_grade  p1     p2     p3     t1     t_new
]```

Topic revision: r10 - 10 Nov 2013, JohanJeuring
Talen en Compilers

Tools

Documentation

Search

Copyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding UUCS? Send feedback