, , , , , , , , , , , ,

[SOLVED] COMP0015 Term 2 Coursework

$25

File Name: COMP0015_Term_2_Coursework.zip
File Size: 244.92 KB

5/5 - (2 votes)

COMP0015 2023-2024 Term 2 Coursework – 60% of the module

This document explains the arrangements for the coursework. You will create an application that analyses a dataset to determine how a vampire infiltration spreads based on testing and contact tracing data. This document is fairly lengthy; do not be deterred by this. The coursework has been carefully designed so that you can complete it part by part and know that you have the correct functionality at each point. Each part is described in its own section.

Strong suggestion: start your coursework as early as possible to give yourself time to resolve issues you encounter.

Deadline

25 March 2024 at 16:00 (4pm – UK time).

How to submit your work

Submit your contact.py file at the assignment link on Moodle. Do not submit any other files. Do not upload a folder containing your files because this can cause compatibility issues for the marking team. You must ensure that your program works properly on your own computer before you submit the code.

Important: make sure your student number (not your name) is included in the comments at the top of your program.

Testing

You are responsible for testing your program carefully. Make sure that you have thought about all the things that can go wrong and test your program to ensure that you know it works correctly in all circumstances.

However, as an aid, we have developed a web-based testing service. We strongly encourage you to take advantage of this service. More details can be found in Appendix 1, the following points are key:

  1. The tool may be extremely helpful—in previous terms, students in aggregate used the service 5,000+ times.

  2. Nevertheless, the tool does not provide any guarantee of a final grade.

    1. Your final submission will be tested on additional datasets, which can change scores.

    2. Your final grade will include marks for comments/style, which can change scores.

    3. We reserve the right to modify your grade after manual inspection. For example, attempts to “trick” the autograder will result in zero marks.

    4. If your code does not work with the autograder, we may attempt to modify it to award a non-zero grade. If successful, we will deduct some marks (typically, 10-20%, although we make no guarantees). Accordingly, please make sure your code works properly with the autograder before submitting.

  3. We do not guarantee that the testing service will always be available (e.g., the server may crash).

  4. The testing service tests each part individually. If you get stuck on one section but can get something working for a later section, then you may still be able to get marks for that later section, even if running it on your own machine (which will use the pre-defined main() function from the template) doesn’t work.

  5. The testing service can sometimes get confused by non-ASCII characters. Accordingly, and with apologies, avoid using Amharic/Arabic/Chinese/Thai/etc. characters in your code, even within comments.

Assessment

You are expected to show that you can code competently using the programming concepts covered so far in the course including (but not limited to): the use of files, strings, lists, dictionaries, sets, conditions, loops, and functions.

Marking criteria will include:

  • Correctness – your code must perform as specified.

  • You must apply Python concepts appropriately.

  • Programming style – see section ‘Appendix 2 Style Guide’ for more detail.

  • Your assignment will be marked using the rubric in Appendix 3. This is the standard rubric used in the Department of Computer Science. Marks for your project work will be awarded for the capabilities (i.e. functional requirements) your system achieves, and the quality of the code. Categories 5 and 6 of the rubric will be used for coding assignments.

Plagiarism

Your work will be checked for plagiarism using a world-class plagiarism detection tool, MOSS. MOSS is used in the Department of Computer Science and across UCL more widely. According to UCL policy, plagiarism is defined as the presentation of another person’s thoughts or words or artefacts or software as though they were your own. Plagiarism includes copying work from other students, submitting work completed by students in previous years of the course, and copying from journal articles, books and internet sources without correct referencing. Plagiarism seriously undermines the integrity of the College and its graduates and if a deliberate case of plagiarism is suspected in this course it will be treated as cheating under the University of London Proceedings in Respect of Examination Irregularities. Further details of the policy and proceedings can be found on the College website at: https://www.ucl.ac.uk/academic-manual/chapters/chapter-6-student-casework-framework/section-9-student-acade mic-misconduct-procedure. It is most important that if you feel that you are not able to deal with the study requirements in this course or if you are unsure about referencing conventions, then please ask your lecturer for help. Do not feel tempted to risk your personal reputation and progress through your degree program by plagiarising or cheating.

It is also most important to remember that each assessment task is an opportunity for you to learn and to develop skills that will be of great value in professional and other areas of your life. While you may feel under pressure to complete each assessment task you should not waste important learning opportunities by dishonestly fulfilling the assessment requirements, including copying material directly from the internet. If you are having difficulty meeting assessment deadlines and requirements please contact your Tutor to work out how best to maximise your learning, rather than resorting to plagiarism or cheating.

If you are in any way unsure about the rules and interpretations relating to plagiarism, please contact your personal tutor or the module leader for clarification. Plagiarism will not be tolerated in this module.

Avoiding Plagiarism

Here are some tips to avoid plagiarism.

  1. Cite all sources of code that are not your original work. You can put the citation into the comments in your program. For example, if you find and use code from a website:

    # The following code is from

    # https://www.quackit.com/python/tutorial/python_hello_world.cfm

  2. Citing sources avoids accusations of plagiarism and penalties for academic misconduct. Please note that you may still receive a low grade if you submit code that is not primarily your own. Cited material should never be used to complete assignments.

  3. Collaborative coding is strictly prohibited. Your assignment submission must be strictly your own code. Discussing anything beyond assignment requirements and ideas is a strictly forbidden form of collaboration. This includes sharing code, discussing code itself, or modelling code after another student’s algorithm. You must not use (even with citation) another student’s code.

  4. You are not permitted to use any artificial intelligence system (e.g., ChatGPT) to help you program your code.

  5. Making your code available, even passively, for others to copy, is also plagiarism.

Before starting your assignment

You are provided with some starter code in the file template.py. Your first action should be to make a copy of this code into a new file, contact.py, where you will work afterwards. You have also been given a helper file format_list.py; you shouldn’t modify this but will need to have it in the same directory. You have also been given some text input files containing infiltration data (DataSet0.txt DataSet5.txt) and associated text output files (DataSet0-out.txt DataSet5-out.txt). You should put these in the same directory also.

Before you start writing code, read through this entire document so that you have a sense of what’s coming and can start to think about how different parts are going to work together. The overall task is more complex than anything you’ve done so far, but it’s also been broken into—forgive me—bite-sized pieces. In section 22, there is a summary of all of the different functions you have to write, the number of lines in the official solution (just to give yourself a sense of relatively difficulty—your own solution might be quite a bit longer, and that’s ok), and an informal sense of which parts are a bit trickier than others (sometimes short functions can be trickier than long ones).

Keep in mind that the testing service you have access to (see appendix 1) and the way we will do the grading will be function-by-function. So, even if you can’t get some critical function working correctly, work on other functions.

Good luck and enjoy!

Running the contact tracing program

There are two ways to run the program from the terminal depending on whether you want to provide the data file name on the command line or whether you want the user to be prompted for the file name. The code in main() contains code to handle this. Important: you should not edit the code in main().

Entering a file name on the command line (suggested)

On Windows, run the program in the terminal, specifying the data file name:

or on macOS type:

The meaning of the terms on this line is:

python or python3

The python interpreter. On macos this will be python3

and on Windows, this will be py or python.

contact.py

The name of the python program.

DataSet0.txt

Name of the data file.

Table 1 Running the program, specifying the file name on the command line

Prompting the user for a file name (possible, but perhaps a bit painful to test)

To prompt the user for a file name, simply run the program in your editor (IDE) as you would normally.

Section 1: Orientation

You have been given several files containing testing and contact tracing data for vampire infiltrations. This data has a “preamble” (initial part), followed by a list of testing and contact tracing data for a series of days (“body”). The format will be explained in detail below.

In order to work with the contact tracing data, you will need to load a data file storing contact tracing data and create appropriate data structures such as a dictionary or a list. These data structures can be used to identify the relationship between the individuals in the data.

Many of the sections require you to print out data after you have calculated it, often in separately-specified functions. Sometimes functions will require you to check for some kinds of data errors, print specified error messages, and then exit by calling sys.exit().

Important: do not modify the main() function; all of your work should be in the other functions as specified in the various sections. Do not add code that just runs at the “top level”. All of your code should be inside functions.

Important: Part of our testing procedure is to run functions individually. Make sure that your function names, parameters, and return values don’t change from our specification. Moreover, make sure that your functions do what they are supposed to do, rather than e.g., trying to do one big function that does the job of several of our specified functions.

Important: Ensure that your program’s output matches exactly the output given to you unless otherwise specified.

Important: do not import any additional packages; lines 7-9 of the template.py file already imports sys, os.path, and format_list; that’s all you need (and all you are allowed).

Data files

The files (as well as your assignment’s expected output for each file) are posted on moodle with the assignment information. Each file ends with the .txt extension. You can open the files in Visual Studio Code or in a text editor to see the contents.

Preamble

The preamble begins with a (comma-separated) list of individuals (without specifying which are humans and which are vampires). These are all of the individuals that may appear in the rest of the dataset. On the next line, the preamble gives the number of days of data that will follow. For example, a valid preamble would be as follows:

Bella, Edward, Jacob, Carlisle, Alice, Emmett, Charlie, Renee, Jessica, Angela

4

N.B. Sometimes spaces are included around names to aid human readability as in the above example; these are optional, but your code will have to remove them if they appear. The strip() method can help you do this.

Important: names may include a mixture of upper and lowercase letters, as well as some special characters such as dashes. Names will not include numbers, commas, colons, the newline character (“
”), tabs (“t”), or the symbol #. Spaces may appear within a name, e.g. “Kuan Yew”, but not at its beginning or end, e.g. no “ Kuan Yew ”.

Day

Unlike in some of the legends, our vampires are able to move around during the day, rather than sleeping in coffins. (Some of them do sleep in coffins at night, but that’s not important for this exercise.) We divide each of our days into two parts (AM, when testing occurs; and PM, when contact occurs). Each day has the following format. On the first line is a comma-separated list of people who have been given a vampirism test in the morning (AM) of that day (perhaps a brief exposure to sunlight); the result of the test (“V” for vampire or “H” for human) is given after each name, separated by a colon. If no one is given a test on a given day, this line will be the special string ##.

On the second line is a number of groups of people who had interactions in the afternoon (PM) of that day. On the third and following lines are comma-separated lists of individuals who have been in contact. To keep things simple:

  1. Each individual can be in at most one contact group on a given day.

  2. On the other hand, there’s no need for an individual to meet with anyone on a given day; in that case, their name won’t appear in any contact list for that day. When vampires are in the neighbourhood, staying home alone can be the safest option!

  3. All people in a group meet simultaneously (perhaps to play a game of baseball). Here’s an example of a valid day:

Edward : V, Bella : H, Jacob : H, Jessica : H 3

Bella, Edward Charlie, Jacob Alice, Renee

N.B. Again, spaces can appear to aid human readability; in this case you’ll have to remove them.

To complete the demonstration of the input, here are the remaining three days promised in the preamble above:

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[SOLVED] COMP0015 Term 2 Coursework
$25