CO2412ΒΆ
Computational-ThinkingΒΆ
Make-PrettyΒΆ
University/Year 2/CO2412 Computational Thinking/CO2412 Computational Thinking Contents
University/Year 2/CO2412 Computational Thinking/Assignment/Computational Thinking Report
Files/University/Year 2/CO2412 Computational Thinking/CO2412 Computational Thinking Assignment Brief.pdf
Tasks:
Task 1: βοΈ
- Real-World Data Simulation:
Write a Python script to generate two simulated datasets representing real-world data:
a) Dataset 1: Random data (completely random order). βοΈ
b) Dataset 2: Reversed data (data sorted in descending order). βοΈ
The datasets should contain sizes of 10,000, and 100,000 elements (4 datasets in total). Each generated number should have 6 digits ranging from 100,000 to 999,999. βοΈ
Task 2: βοΈ
- Implement Sorting Algorithms:
Implement the following sorting algorithms in Python and use them to sort the datasets in Task 1:
c) Merge Sort βοΈ
d) QuickSort βοΈ
Each sorting algorithm should save its sorted array output to a text file. You can use either a single file or multiple files for this purpose. βοΈ
If using a single file, ensure it is clear which section corresponds to each sorting algorithm and dataset. (N/A) (Multiple Files)
Task 3: βοΈ
- Performance Analysis of sorting algorithms:
Measure and analyse the following performance metrics for each sorting algorithm (Merge Sort and Quick Sort) and dataset sizes including:
a) Execution Time: (in milliseconds) for sorting each array. βοΈ
b) Memory Usage: (in kilobytes) for sorting each array. βοΈ
c) Number of Comparisons: (swaps) made during the sorting process. ? βοΈ
Task 4: βοΈ
- Graphical Comparison:
Create graphs (e.g., line charts or bar charts) that compare the runtime performance of the sorting algorithms across different dataset sizes. βοΈ
Implement this comparison using Python to visualise how the algorithms perform as data scales. βοΈ
The graph/graphs should include Part 3a, 3b and 3c (Execution Time, Memory Usage, Number of Comparisons) βοΈ
Deliverables:
- Python .py program (1) containing all code
- Text files contained sorted array output
- 1000 word maximum report
40 - 49%:
- Scripts (in python) as specified in task 1 and 2 are executable without error βοΈ
- Random number generation operation task specified in task 1 βοΈ
- Sorting algorithms operations as specified βοΈ
- Evidence of the output file containing the sorted arrays
- the report contains 5a,βοΈ 5b,βοΈ 5e, and 5f βοΈ
50 - 59%:
- As above.
- the sorting algorithms specified in task 2 are using the same copy of the generated random arrays to maintain data integrity βοΈ
- All python scripts have suitable data structure βοΈ
- Any evidence of an acceptable code commenting is demonstrated (See Course Comment Stylesheet) βοΈ
- All requirements from task 3. Performance analysis of sorting algorithms.
- Any evidence for implementation of task 4: Graphical Comparison
- The report discusses all criteria specified in task 5. βοΈ
60 - 69%:
- As above. βοΈ
- The code in task 1 and task 2 demonstrates the sorting algorithms use the least amount of memory resources including variables and avoiding magic numbers βοΈ
- Code maintains good programming practices, commenting, naming conventions for variables, functions, and classes, and code has the correct indentation.
- Task 4. Graphical Comparison is implemented to high standard (vague)
- Any evidence of using "functions" is demonstrated in all python scripts
- Report discusses all criteria specified in task 5. Report Writing of the instruction to a high standard using technical language.
70 - 100%:
- As above.
- Evidence of any mechanism for ensuring that all the numbers in the randomly generated numbers are unique.
- Report discusses all criteria specified in task 5. Report Writing of the instruction are covered to an excellent standard with competent use technical language.
- Any evidence of inclusion and discussion graphs regarding task 4
- Generated graph(s) are included in the report and present Execution Time, Memory Usage, and the Number of Comparisons versus the array sizes in a clear and concise manner.
- Report provides a clear and accurate explanation and analysis of the graph.
- Number of references is adequate and a corrected format used for both in-text and bibliography citing