Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: THEend8_
MATH6182 Assignment 1
1. Instructions
This Mid_Module_Assignment (Assignment 1) will count for 20% of the assessment for
MATH6182. The deadline is 12:00 (noon) on Thursday11th November 2021. The deadline
is strict. Assignments submitted after the deadline are not allowed, except where special
considerations apply.
Ensure that you take frequent and multiple backups of your work, since excuses concerning
lost or corrupted files will not be treated sympathetically. Please, verify that you follow all
instructions carefully and your work has been submitted successfully.
1.1. Replit submission
Therefore, you must sign up a repl
account and write and submit your assignment through your repl account.
● Your university email account will receive an invitation email from Replit. Please
create an account and complete your account by adding your first and last names. To
proceed with that, click your username and choose option “Account”
● You can access our team “MATH6182202122” by clicking “Teams” on the left side
of the page.
● Find the ‘MATH6182-Mid-Module Assignment 1’ and click the link “Start project”.
● You can run the code successfully by pressing the button ‘Run’ and see the results
in Console
● Your code needs to pass some unit tests by clicking to the last button (v) in the left
column and then click "Run tests". It will show how many unit-tests your code
passed. You will have a full mark if the code passed all unit tests.
● If you are happy with your code, please submit the assignment by clicking the
"Submit" button in the top right corner. You can resubmit the Assignment many
times as you wish before the deadline.
1.2. Collaboration, plagiarism and cheating
● You should work on your own when carrying out the assignment.
● Please refresh your memory of the University’s code on academic integrity, see
University of Southampton Calendar 2021/22 .
● Please note that allowing somebody else to copy your work is counted as plagiarism:
it carries the same penalty as copying work.
● Submissions will be strictly tested for plagiarism with specialised software and
penalties strictly enforced.
1.3. Purpose of assessment
● Write a structured computer program.
● Demonstrate good programming practice, as discussed in the course notes, lectures and
computer workshops.
● Demonstrate good and correct use of Python.
1.4. Marking:
The Assignment will be marked automatically by Repl.it. Your mark is the percentage
of the passed unit tests.
2. Content
The Assignment consists of three Tasks.
TASK 1: The purpose of the programme is to calculate the final mark of MATH6182 for a
student. The Module has three Assignments: mid-term Assignment 1 (20%), mid-term
Assignment 2 (30%) and final Assignment (50%).
Students need to write a function:
● mark_calculated(): accepts three inputs mid_mark1, mid_mark2 and final_mark,
which are integers from 0 to 100. It returns a number from 0 to 100 representing
the total mark of the student calculated as
total_mark = mid_mark1*0.2 + mid_mark2*0.3 +final_mark*0.5
Note: if the inputs are not in [0,100] then return ‘Inputs are not allowed’.
TASK 2: The purpose of the programme is to classify student group (Distinction, Merit, Pass,
Fail) depending on their total_mark.
● mark_result(): accepts one input total_mark calculated in TASK1 above. It must
return the grade of the student. The relation between total _mark and group are given
in Table 1.
Table 1:
total _mark group
70 <= total_mark <=100 Distinction
60 <= total _mark < 70 Merit
50 <= total _mark < 60 Pass
0 <= total _mark < 50 Fail
Note: if the inputs are not in [0,100] then return ‘Inputs are not allowed’.
TASK 3: Given a csv file containing the number of new cases with confirmed positive COVID-
19 test result, by specimen date in London, it consists of 260 numbers for dates from
11/02/2020 to 27/10/2020. The data is sorted by date, namely, the first number stands for 2054
new confirmed cases on and the last number represents one confirmed case on
11/02/2020. So, treat the dates as a sequence of integers 0, 1, 2, · · ·, 259, e.g., 27/10/2020 is
date 0 and 11/02/2020 is date 259. Your task is to write a Python program to:
2.2 Print out the indices of the dates with the highest and positive lowest number (i.e., not
zeros) of new confirmed cases. (Note: if there is more than one highest or one positive lowest
number, you should print out all the indices. The printed indices should be integers between 0
and 259.)
2.3 Calculate the mean and standard deviation of the whole data,
2.4 Identify the indices of the top 5% of dates of new cases then calculate the total cases in
this top 5%.
Hints:
● You can create new functions if needed. These must follow the good coding practices
we have taught in the lectures and labs.
● Please include comments in your code to explain workings and these must be in
understandable English.