orphan: |
---|
The midterm programming test is worth 20% of the course. The format of this test is deliberately similar to the programming exam in May that makes up the other 80% of the assessment. This test therefore provides both some feedback on how you are progressing in the course, and an opportunity to practice for the end of term exam. This is a programming module, so the midterm test will consist of programming exercises. The content which will be examined in the test is everything covered up to and including chapter 6. There won't be any new concepts introduced during the test, however the questions may suggest that you use Python modules, classes, or functions that haven't previously been introduced in the course. These will always be similar in character to ones that have previously been mentioned, and the test instructions will explicitly link to the Python documentation for any features they suggest.
The final exam will be two hours long and comprise 4 questions, each of which will be marked out of 20. The midterm test will be 40 minutes long, so to keep the question format consistent with the final exam, there will a single question. The extra 10 minutes is to give you some flexibility, because in the final exam you could spend more time on some questions than others. The question will be subdivided into identified parts with a specified number of marks associated with each.
Of the 20 marks for each question, 4 will be explicitly for basic style. 2 marks will be for passing flake8 with no errors. If there are only a handful of minor flake8 errors then you will receive 1 mark, and if there are more than that you will receive 0. flake8 is an imperfect tool, so the marker will check the output of flake8 and disregard any false positives. The other 2 marks will be allocated on a similar basis for basic style matters that flake8 cannot check, such as conforming with naming conventions and commenting appropriately.
The remaining 16 marks will be allocated to the various parts of the questions. As with a written maths test, getting the correct final answer is necessary but not sufficient. A full marks answer to a question will be functionally correct, have optimal :term:`algorithmic complexity`, and be elegant and readable. The tests provided are an aid to writing correct code: passing the tests does not prove that your answer is correct. For example, your code could produce the correct output in the cases tested but nonetheless fail to implement the specification in the question. For the avoidance of doubt, a correct answer is one which correctly implements the specification, not simply one which passes the tests provided.
As a rough guide, a solution which produced the correct output but was very inelegantly written (for example taking many too many steps to achieve simple functionality) and which used a suboptimal algorithm could be expected to earn half of the marks available for a question.
The way to prepare for the test is to program. In the first instance, you should make sure you have completed all of the programming exercises for the previous weeks. Ensure that you can run and pass all the tests locally on your machine, and also ensure that you have pushed everything to GitHub and that the tests show as passing there.
Once you've gone through the previous exercises, you should attempt the practice questions here. Each of these is a question similar in format and length to the questions on the exam. Just like on the exam, the question is specified in the :file:`README.rst` file in the exercise repository. When you first attempt each of these exercises, you should set yourself a 40 minute timer and see what you can get done (and committed and pushed!) in the time you would have in the test. After that, if you haven't finished, then go on and finish the exercise. Programming is a practical discipline, and finishing one exercise will make you faster and more capable when you attempt the next one.
.. proof:exercise:: Obtain the `practice problem from GitHub Classroom <https://classroom.github.com/a/whZ5Hmzx>`__. Follow the instructions in the README file that will be displayed on GitHub on your copy of the page. Note that these instructions are only applicable to the practice problems. The test this year will be conducted using a new system.
.. proof:exercise:: Obtain the `practice problem from GitHub Classroom <https://classroom.github.com/a/BIoMj_-E>`__. Follow the instructions in the README file that will be displayed on GitHub on your copy of the page. Note that these instructions are only applicable to the practice problems. The test this year will be conducted using a new system.
.. proof:exercise:: Obtain the `practice problem from GitHub Classroom <https://classroom.github.com/a/jVHNwYHx>`__. Follow the instructions in the README file that will be displayed on GitHub on your copy of the page. Note that these instructions are only applicable to the practice problems. The test this year will be conducted using a new system.
.. proof:exercise:: Obtain the `practice problem from GitHub Classroom <https://classroom.github.com/a/6bPHF9F7>`__. Follow the instructions in the README file that will be displayed on GitHub on your copy of the page. Note that these instructions are only applicable to the practice problems. The test this year will be conducted using a new system.