Question: The pass mark is 70. The problem is that the marking system expects a pass mark of 40. Thus the module marks have to be
The pass mark is 70. The problem is that the marking system expects a pass mark of 40. Thus the module marks have to be mapped to the marking system. The mapping uses linear equations as follows:
A)If a students module mark is 70 or less, all component marks are multiplied by 4/7
B)If a students module mark is above 70, all component marks are multiplied by MM/50-1
i. MM is the module mark.
After multiplication all marks are rounded to the nearest integer. The module mark is equal to the sum of:
1)The mark for the flight simulator exercise times 0.1
2)The sum of the marks for the tests times 0.1
3)The sum of the marks for the seven presentations times 0.1
4)The sum of the marks for the three MATLAB exercises times 0.2
5)The alternative assignment mark times 0.5
Percentage of available marks are used in the above calculation rather than actual mark values. As an example, assume a student achieved 80 % for the flight simulator exercise, 70 % average in the five tests, 60 % in the presentations, 40 % over the three MATLAB exercises and 54 % in the alternative assignment . This gives a module mark of 0.1*80 + 0.1*70 + 0.1*60 + 0.2*40+0.5*54 which equals 56 %. As this mark is 70 or less the marking system will be 4/7*56 = 32.
For this question write a function that has an array containing the four percentages for the assignments, the first four items from the list above, as the input and returns the percentage mark the student needs to get in the alternative assignment to pass the module. Based on the example in the previous paragraph [80, 70, 60, 40] would be passed into the function and 82 returned from it. The function should check that the user has passed an array containing four numbers into it, if not the value returned should be set to -1. Also write a script, in a separate file, that show how you have tested your function.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
