- Information
- AI Chat
Was this document helpful?
9. Recursion - Computer science assignments to be done in python.
Course: Computer science1015 (CSC1015F)
257 Documents
Students shared 257 documents in this course
University: University of Cape Town
Was this document helpful?
Version: 19/04/2023 22:02
Page 1 of 3
CSC1015F Assignment 9
Recursion
Assignment Instructions
This assignment involves constructing Python functions that use recursion. You must NOT use
loop constructs (such as ‘for’ and ‘while’) in your solutions.
Assessment
Your code will be automatically marked. Say that there are N trials for a question. The first
(N-1) trials will check that your code functions correctly by executing it on test inputs. The Nth
is a penalty test. It scans the code for evidence of the use of iteration or the use of list/string
reversal expressions. If it finds evidence, then it deducts the marks for the question.
In some cases, the penalty test will report a false positive. For instance, it thinks you're using
loops but you are not, you simply have a variable name containing the word 'for', e.g.
'former', 'afford'.
Furthermore, your solutions to this assignment will be evaluated for correctness and for the following
qualities:
• Documentation
o Use of comments at the top of your code to identify program purpose,
author and date.
o Use of comments within your code to explain each non-obvious functional
unit of code.
• General style/readability
o The use of meaningful names for variables and functions.
• Algorithmic qualities
o Efficiency, simplicity
These criteria will be manually assessed by a tutor and commented upon. Up to 10 marks will be
deducted for deficiencies.