Question: 2 Term Mark Write a function called term.work mark, which calculates your term mark (as a contribution to your final grade) given your marks on
2 Term Mark Write a function called term.work mark, which calculates your term mark (as a contribution to your final grade) given your marks on all of the coursework components). Using the default weights this will return a maximum result of 60 (since the exann is worth 40% of your final grade): your mark on assignment 0 (by default this is out of 25) your mark on assignment 1 (by default this is out of 50) your mark on assignment 2 (by default this is out of 100) your mark on the exercises (by default this is out of 10) your mark on inverted lecture (by default this it out of 5) your term test marks (by default this is out of 50)3 In the starter code provided in ex2.py, there are already several global variables that you will need to compute this score. The contribution of each piece of coursework is computed as: marimum-markweight Your coursework mark is the sum of these component contributions. An example output is given below (note that this may vary depending on the state of the global variables): >>> term work mark(25, 50, 100, 10, 5, 50) 60.0 >>> term,work mark(20, 45, 70, 8, 4, 40) 47.9 Hint: Rather than writing the same computation over and over, you can make your life easier by using a helper function... perhaps some nice person may have left a useful function in the file before uploading it 2 Term Mark Write a function called term.work mark, which calculates your term mark (as a contribution to your final grade) given your marks on all of the coursework components). Using the default weights this will return a maximum result of 60 (since the exann is worth 40% of your final grade): your mark on assignment 0 (by default this is out of 25) your mark on assignment 1 (by default this is out of 50) your mark on assignment 2 (by default this is out of 100) your mark on the exercises (by default this is out of 10) your mark on inverted lecture (by default this it out of 5) your term test marks (by default this is out of 50)3 In the starter code provided in ex2.py, there are already several global variables that you will need to compute this score. The contribution of each piece of coursework is computed as: marimum-markweight Your coursework mark is the sum of these component contributions. An example output is given below (note that this may vary depending on the state of the global variables): >>> term work mark(25, 50, 100, 10, 5, 50) 60.0 >>> term,work mark(20, 45, 70, 8, 4, 40) 47.9 Hint: Rather than writing the same computation over and over, you can make your life easier by using a helper function... perhaps some nice person may have left a useful function in the file before uploading it
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
