Python代写-SCIENCE 2021/2022
时间:2021-11-04
INTRODUCTION TO COMPUTER SCIENCE 2021/2022 Masters Programmes

Coursework Administrative Details

Module/Lecture Course: COMP42215 Introduction to Computer Science
Deadline for submission: 14:00 Friday 5th November 2021
Work returned: Friday 10th December 2021
Submission
instructions:
Submit all files via Ultra.
Format: Programme source code should be as a Jupyter
notebook, report as a Word or pdf document. Do not put
your name on your work, just your username.
Contribution: This coursework contributes 100% to the final mark for
the module.


In accordance with University procedures, submissions that are up to 5 working
days late will be subject to a cap of the module pass mark, and later submissions
will receive a mark of zero.

Content and skills covered by the assignment:
• Be able to write computer programs in python
• Be able to select appropriate data structures
• Be able to evaluate the complexity of an algorithm
• Effective written communication
• Planning, organising and time-management
• Problem solving and analysis

General Requirements
You should develop an iPython (Jupyter) notebook to assess the performance and
algorithmic complexity of various algorithms using a range of data structures. Write up
your experience and results in a 1,500 word report.

INTRODUCTION TO COMPUTER SCIENCE 2021/2022 Masters Programmes

iPython Notebook [50%]
1) Finding the mean, mode and median of a list of numbers. [10%]
a) Write a function to generate a Python list of random numerical data. The
function should take as an argument the desired size of the list.
b) Implement your own mean, mode and median functions that take a Python list
as input. Your functions can use the built-in Python sort function if you wish.
c) Evaluate the performance of your mean, mode and median functions against
the equivalent built-in Python functions (from the statistics module) by timing
their execution on a range of list sizes.
2) Finding the mean, mode and median of a NumPy array of numbers. [10%]
We will complete the same tasks again, but this time using NumPy arrays instead
of Python lists.
a) Write a function to generate a NumPy array of random numerical data. The
function should take as an argument the desired size of the array.
b) Implement your own mean, mode and median functions that take a NumPy
array as input. Your functions can use the NumPy sort function if you wish.
c) Evaluate the performance of your mean, mode and median functions against
the equivalent built-in NumPy functions by timing their execution on a range of
array sizes.
3) Generating prime numbers. [15%]
Your solutions to this question should use a simple brute force trial division
approach to ensure a number is prime. You should check that a number is only
divisible by 1 and itself, and you should only use Python lists and no more
advanced data structures.
a) Write a Python function that takes a single argument, and that generates a list
of prime numbers from 2 up to and including the value of the argument.
b) Write a Python function that takes two arguments, and that generates a list of
prime numbers starting from the value of the first argument up to and
including the value of the second argument.
4) Generating prime numbers with a sieve. [15%]
Complete the same tasks as in question 3, but this time implement the Sieve
of Eratosthenes as part of your solutions, rather than brute force trial division.
You should only use Python lists and no more advanced data structures.
a) Write a Python function that takes a single argument, and that generates a list
of prime numbers from 2 up to and including the value of the argument, using
the Sieve of Eratosthenes.
b) Write a Python function that takes two arguments, and that generates a list of
prime numbers starting from the value of the first argument up to and
including the value of the second argument, using the Sieve of Eratosthenes.
c) Evaluate the performance of your solutions to 4a and 4b in comparison to
those you wrote for Question 3.
INTRODUCTION TO COMPUTER SCIENCE 2021/2022 Masters Programmes


Individual Report [50%]
Using the data that you have produced, write a report (max 1,500 words) on the
algorithmic complexity of the functions and data structures you have investigated.
Your report should include:
1) An introduction to the problems being investigated [5%], including a
definition of algorithmic complexity and discussion of the impact different data
structures can have on performance.
2) A description of the methods [5%] you have used to find your results (i.e.
choice of data, number of data points, size of lists used)
3) A summary of your results [15%], including graphs where appropriate. You
should use matplotlib to prepare your results, and the code for this should be
included in your notebook submission
4) A discussion of the results [15%], including what you conclude about the
complexity of the functions you have implemented.
5) Academic English writing [10%], with good use of technical vocabulary, correct
grammar, use of third person, appropriate document structure and referencing
where relevant.

The word count should:

• Include all the text, including title, preface, introduction, in-text citations,
quotations, footnotes and any other item not specifically excluded below.
• Exclude diagrams, tables (including tables/lists of contents and figures),
equations, executive summary/abstract, acknowledgements, declaration,
bibliography/list of references and appendices. However, it is not appropriate
to use diagrams or tables merely as a way of circumventing the word limit. If a
student uses a table or figure as a means of presenting his/her own words, then
this is included in the word count.

Examiners will stop reading once the word limit has been reached, and work beyond
this point will not be assessed. Checks of word counts will be carried out on submitted
work. Checks may take place manually and/or with the aid of the word count provided
via an electronic submission.

Students are strongly advised to use Arial font size 12 for their assignments.



INTRODUCTION TO COMPUTER SCIENCE 2021/2022 Masters Programmes


PLAGIARISM and COLLUSION
Your assignment will be put through the plagiarism detection service on duo.
Students suspected of plagiarism, either of published work or work from unpublished
sources, including the work of other students, or of collusion will be dealt with
according to Computer Science and University guidelines.






























































































































学霸联盟


essay、essay代写