11.2 2018
Instructions
The test will be from 8:30 to 9:30 on 12th April (IVLE folder will closes at 9:30)
This is an open universe test.
This, however, does not mean you can copy and paste from any person or any source.
You can discuss and share your ideas to help each other. However, in the end, you need to submit Python code that you developed.
Please insert comments to give a clear idea as to what you are doing. I.e. what you are trying to do and why.
For this test:
- Simple solutions are preferred over more complicated ones.
- Readable code is preferred over efficient code.
Grading Criteria
The following scheme will be used to grade your solution.
Component Weight(%) Comment Starting strategy 20 This is your plan, before you start. Implementation (In Python) 30 This is the strategy you actually implemented. Correct syntax. Simplicity of strategy 15 Readability 15 Comments 15 Bonus 5 For an overall simple, readable, exceptional solution.
The Task
- Download the zip file
data-for-the-test.zip
- This contains many
.jpg
files named in the formatrandom-integer_name-of-person_four-digit-index.txt
(e.g.00374_CHAMMIKA_0042.txt
) - There is a set of files for each one of you.
- Use Python code to read all the files under your name and reconstruct the image.
- Save the image in
jpg
format with the namename-of-person.jpg
’ - Upload your code and resulting image into the IVLE folder
Python Test
.- Please name your code file in the format
matric-number_test.ipynb
(ormatric-number_test.py)
- Please name your code file in the format
Outline your strategy.
- Use a
docstring
or Markdown to briefly outline your strategy before you start coding. This component is worth 15% of this test. - You do not have to stick to this strategy during implementation. Your approach can (and perhaps should) evolve as you attempt to find a solution.
Things to note:
Note:
- The
index
always starts at zero. - The
random-integer
is a random number. (dah!) - Different individuals will have a different number of files.
- Each file contains a portion of an image.
- The
Some commands you might find useful:
np.concatenate()
,sort()