You are on page 1of 4

SCHOOL OF

COMPUTING
Faculty of Science
and Engineering

COMP6010
Fundamentals of Computer Science

ASSIGNMENT 2 – S2, 2023


PYTHON PROGRAMMING ASSIGNMENT

Alert: This material is provided to you as a Macquarie University student for your individual research
and study purposes only. You cannot share this material publicly online without permission. Macquarie
University is the copyright owner of (or has licence to use) the intellectual property in this material. Legal
and/or disciplinary actions may be taken if this material is shared without the University’s written
permission.
CONTENTS
COMP6010 Fundamentals of Computer Science ...................................................................................... 1
Assignment 2 – S2, 2023 Python Programming Assignment ............................................................... 1
Your Mission....................................................................................................................................... 2
Task Description................................................................................................................................. 2
Submission Instructions .................................................................................................................... 3
Marking Guidance .............................................................................................................................. 3
Questions ............................................................................................................................................ 4

YOUR MISSION

You have been provided with a zip file containing several .py files which contain empty functions to
complete and related datasets. This plain text file has been created in visual studio code and will require
a python installation to run.
Your mission (should you choose to accept it) is to complete the functions outlined in the python file
and to upload your completed python file (NOT a jupyter notebook) to the submission box in iLearn
before the deadline. There are marks for each function that successfully passes all test values we decide
to use to test your functions. We have provided several tests in the assignment2_test.py file, however,
these are not exhaustive, and you are encouraged to try other values to ensure your functions work as
expected.
This assignment is intended to take around 15 hours.
Please read the task description and submission instructions carefully.

TASK DESCRIPTION
You can find the instructions for each task in the python file provided. A list of the relevant questions to
answer is also provided below. Each function will be tested in isolation, but you may call other functions
or create your own helper functions.
Read the function descriptions within the assignment2.py file for more details on
expectations for each function.
1) Assignment2_student_test.py
a. test_is_in_range
b. test_list_contains_even
c. test_is_ascending
2) assignment2.py
a. average_wam
b. highest_wam
c. most_popular_course
d. get_distinct_regions
e. add_spaces
f. convert_to_dict
g. validate_dictionary
SUBMISSION INSTRUCTIONS

What to submit:
• Two python files (.py) file containing your own work based on the tasks listed in this
document. You should submit assignment2.py and assignment2_student_test.py. DO NOT
submit assignment2_test.py or any of the dataset files.
• The python file should be free from errors. Any functions you don’t implement should be left
in their original state. Any of the originally provided function headers should not be modified
and no additional imports should be added to the file from what was originally provided. You
must also not hard code any values in your functions.
• The python file should include the completed declaration at the top of the file. You should put
an ‘x’ as directed at the top of the python file and update the bold section to include your
name and student ID.

# Student Declaration
# I [insert name and Student ID here] declare that this is my own work and that
# I have not used any code or logic from other people or from sources outside of the unit.
# I understand that it is ok to look at COMP6010 videos and COMP6010 resources
# and that researching how certain python operators / functions work is ok.
# [] <== put an x in here to indicate you have read and agree to the above statements.

Where to submit:
• The submission box for Assignment 2 in the “Assessments” section in iLearn.
When to submit:

• Submit as many times as you like up to the deadline of Sunday (Sunday, week 13) 5th
November 11:55pm.
• We will only keep a copy of your final submission. We cannot retrieve earlier versions of your
submission. You can submit a version early and then update your submission up to the
deadline.
• Consult the unit guide (general assessment information section) for the late submission
penalties.
Why:
• Unit Learning Outcomes 1, 2, 3, and 4.

MARKING GUIDANCE

Your code will receive up to marks per function as outlined below for a total of 100 marks. For each
function, a mark out of 10 will be provided by a combination of hand marking and tests:
• assignment2_student_test.py
o Marks for writing unit tests be awarded based on:
§ The comprehensiveness of the test cases written. Do the test cases cover a
broad range of possible inputs to the related functions in assignment2.py?
§ How well structured your test cases are. Is it easy to understand what is being
tested and why? Comments will be useful for describing the intent of test cases,
but the code should also be well written.
§ The correctness of the tests written.
o Each set of test cases that fit the above criteria will be worth 8 marks each. (24 marks
in total)
o 6 marks will be awarded based on your answer to the two questions in the
assignment2_student_test.py file. Specifically, the following two questions:
§ Which function had the incorrect implementation based on the specifications
given? (2 marks)

Fundamentals of Computer Science S2, 2023 – Assignment 2


Page 3 of 4
§ How did you identify this implementation error? Which test case specifically
revealed this? (4 marks)
o You must provide your answer to the two questions in the area provided in the file.

• assignment2.py
o Marks will be awarded based on the unseen test cases that will be run by the markers.
Several test cases are provided, but it is up to you to ensure that the functions work for
a range of inputs.
o 10 marks will be awarded for each function that successfully passes the unseen test
cases.

You are NOT allowed to import any python libraries. All code must only use the base
python 3.X language features.
You may create your own helper functions that can be called. Be mindful that all tests will call the
functions that were provided in the initial python file.

QUESTIONS

Please do not email staff with questions. Use the Private forum provided in the iLearn space for
assignment-related questions. The unit staff may post your question anonymously in the general
public forum and answer it there for the benefit of the cohort if they deem it necessary.

Fundamentals of Computer Science S2, 2023 – Assignment 2


Page 4 of 4

You might also like