首页
网站开发
桌面应用
管理软件
微信开发
App开发
嵌入式软件
工具软件
数据采集与分析
其他
首页
>
> 详细
BEE1038代做、代写Python设计程序
项目预算:
开发周期:
发布时间:
要求地区:
Assignment [100 marks, weight: 30%]
BEE1038: Introduction to Data Science in Economics
Assignment Deadline: Thursday 28th March at 15:00 (GMT)
In this assignment, you will demonstrate your understanding and mastery of programming in
Python using data science tools.
What you will have learnt by the end of Week 6/7 should cover almost everything you will need,
and what you learnt is already enough to start working on some problems. If you are stuck then
read through the notebooks again. If you are still unsure, then have a look online. Google and
Stack OverFlow are your friends!
The grade of this assignment contributes 30% towards your overall grade in the course. The
following aspects need to be shown:
● Basic Python code and functions
● Manipulation and calculations on NumPy arrays and Pandas data frame
● Preparing and preprocessing data.
● Doing a basic plot, and changing plot markers, colors, etc.
● Improving and extending analysis.
● Ability to elaborate on your approach and explain your rationale when completing the
assignment.
Your submission will be a compressed file (.zip) containing the following files:
1. A copy of your Python script named your_name_solution.ipynb (done in Jupyter
Notebook). For example, my notebook file will be named cecilia_chen_solution.ipynb.
2. Same copy printed as a PDF, your_name_solution_code.pdf. Take a look at this link for
instruction on exporting Jupyter Notebok as PDF.
3. Three .png images of your final plots: one that replicates the plot in Problem 4 (p4.png),
one that replicates the plots in Problem 5 (H) (p5h.png), and those that show any
additional analysis in Problem 6 (p6a.png, etc.).
You must explain your approach and rationale using the markdown and/or comments in code.
Any block code or results without appropriate explanation will be panelized. Your scripts must
be sufficient to reproduce your answers to all questions and plots. You are responsible for
making sure that your Jupyter Notebook file will open without errors. Submissions that do not
open may receive a zero.
Collaboration & Misconduct: You are encouraged to think about this assignment in groups or ask
each other for help. If you do, you should do the following: 1) write your own code (no code
copying from others), 2) Report the names of all people that you worked with in your submission,
3) if you received help from someone, write that explicitly, 4) plagiarism of code or writeup will
not be tolerated; do not copy blocks of code in your answers, and 5) do not post your solutions
online (even after the release of your marks). For those who want to evidence your experience
to recruiters, make sure you share a private link to your project/work (or undiscoverable link). If
we can find your answers online anytime until September this year, you will be reported for
misconduct.
The University takes poor academic practice and academic misconduct very seriously and expects
all students to behave in a manner which upholds the principles of academic honesty. Please
make sure you familiarize yourself with the general guidelines and rules from this link1 and this
link2
.
Problem 1 [15 marks]
Write a function that accepts a number n as an input, and it returns n rows that look like the
following pattern. Run your function for n = 21 (the output below is for n=12 and n = 21).
1 http://as.exeter.ac.uk/academic-policy-standards/tqa-manual/aph/managingacademicmisconduct/
2
https://vle.exeter.ac.uk/pluginfile.php/1794/course/section/27399/A%20Guide%20to%20Citing%2C%20Referencing
%20and%20Avoiding%20Plagiarism%20V.2.0%202014.pdf
Output when n = 12 output when n = 21
Problem 2 [15 marks]
Solve all the following questions.
A. Write a function that you will call min_distance() that takes as input a list of integers and
returns the minimum (absolute) difference between any two numbers in that list.
For example, min_distance([5,9,1,3]) should return 2
While, min_distance([3,4,1,1]) should return 0
B. Using the min_distance() function you have created, create another function
max_min_distance() that takes a list of lists of integers as an input, and it returns the
maximum value among all the minimum distance values calculated on the inner-lists
(output of min_distance() for each inner-list).
For example, max_min_distance([[5,9,1,3],[3,4,1,1]]) should return 2
C. Demonstrate that your max_min_distance() function works well on the following input:
[[5,2,1,6],[10,0,4],[9,18,1],[100,100,27,9,18],[28,30]]
D. Set the NumPy random seed to 99 (Use the random generator method:
numpy.random.default_rng(seed)). Generate a 1-dimensional NumPy array of size 1000
consisting of random integers between 0 and 3000 (both included). Reshape this array
into a 2-dimensional array of 50 rows (i.e., 50x20). Test your function on this input.
E. Use the %timeit function to calculate the time for your max_min_distance() algorithm to
run on the input from D.
Problem 3 [20 marks]
A. Set the NumPy random seed to 120.
B. Create a 3x20x5 array (3 depths, 20 rows, 5 columns) of random integers between
-20 and 100 (both included) and print it.
C. For this part, consider the first depth of the array (i.e., first dimension is 0). Print the
number of elements that are strictly more than 60 in each column (of the first depth).
D. For this part, consider the third depth of the array (i.e., first dimension is 2). Print the
number of rows (of the third depth) that contain any positive values.
Problem 4 [20 marks]
In this problem, you need to reproduce the plot shown below, as accurately as possible, from
scratch. First, you will need to generate your x-axis data, and calculate the two series of your yaxis data using the simple functions shown in the legend.
Problem 5 [20 marks]
In this problem, you will use a dataset called harrypotter_dataset. Please follow the instructions
below for your data analysis.
A. Load the harrypotter_dataset.csv file in your notebook, and print the dataset. Print the
number of rows.
B. Print the column headings of the data set.
C. You will notice that column headings have an unnecessary leading space (e.g., “ Book
index”. Write a code to remove the leading space from every column name in the dataset,
replace the space between the column name with _, and convert all the column headings
to lower case. Save changes to your data frame. Re-run code in B to make sure it is solved
now. For example, the original column name is “ Book index”. It should be “book_index”
at the end.
D. Create a new column: ‘runtime_in_hours’ using the column ‘Runtime (in minutes)’. The
new column should have floating numbers (e.g., 150 minutes à 2.5 hours).
E. Create a new column: ‘is_same_date_uk_us’: boolean (True : “UK Movie release date” is
the same as “US Movie release date”, False : otherwise)
F. Calculate the following:
a. Suppose you chose to read one chapter from one of the books at random. What
is the probability that this chapter belongs to Book number 7? (hint: write a code
that divides the number of chapters in Book number 7 by the total number of
chapters)
b. Suppose you chose to watch one minute of one of the movies at random. What is
the probability that it belongs to one of the following movies 1st, 3rd, 5th, or 7th ?
c. What is the percentage of the movies that were released on the same date in both
the UK and the US?
G. Create a new data frame, df_nineties, which contains data (all columns) for books
released before 2000 i.e., ‘Book release year’ is strictly smaller than 2000.
H. Reproduce the following plot: you will get marks for reproducing the plot as accurately as
possible, taking into consideration the steps undertaken to reach the final figure.
Problem 6 [10 marks]
For this problem, use the same data from Problem 5 to perform compelling extra analysis.
Perhaps make use of the other columns in the harrypotter_dataset data set. You will get marks
if you find a compelling and interesting visualisation (one plot is enough, but you may produce
as many as you want if they are all tied into one main idea). Make sure you provide textual
description and/or analysis of the plot. You can also collect additional data to compliment your
analyses. For instance, you can add new columns to the dataset such as a cast list. Please be sure
to write down the source of your additional data collected.
软件开发、广告设计客服
QQ:99515681
邮箱:99515681@qq.com
工作时间:8:00-23:00
微信:codinghelp
热点项目
更多
代做ceng0013 design of a pro...
2024-11-13
代做mech4880 refrigeration a...
2024-11-13
代做mcd1350: media studies a...
2024-11-13
代写fint b338f (autumn 2024)...
2024-11-13
代做engd3000 design of tunab...
2024-11-13
代做n1611 financial economet...
2024-11-13
代做econ 2331: economic and ...
2024-11-13
代做cs770/870 assignment 8代...
2024-11-13
代写amath 481/581 autumn qua...
2024-11-13
代做ccc8013 the process of s...
2024-11-13
代写csit040 – modern comput...
2024-11-13
代写econ 2070: introduc2on t...
2024-11-13
代写cct260, project 2 person...
2024-11-13
热点标签
mktg2509
csci 2600
38170
lng302
csse3010
phas3226
77938
arch1162
engn4536/engn6536
acx5903
comp151101
phl245
cse12
comp9312
stat3016/6016
phas0038
comp2140
6qqmb312
xjco3011
rest0005
ematm0051
5qqmn219
lubs5062m
eee8155
cege0100
eap033
artd1109
mat246
etc3430
ecmm462
mis102
inft6800
ddes9903
comp6521
comp9517
comp3331/9331
comp4337
comp6008
comp9414
bu.231.790.81
man00150m
csb352h
math1041
eengm4100
isys1002
08
6057cem
mktg3504
mthm036
mtrx1701
mth3241
eeee3086
cmp-7038b
cmp-7000a
ints4010
econ2151
infs5710
fins5516
fin3309
fins5510
gsoe9340
math2007
math2036
soee5010
mark3088
infs3605
elec9714
comp2271
ma214
comp2211
infs3604
600426
sit254
acct3091
bbt405
msin0116
com107/com113
mark5826
sit120
comp9021
eco2101
eeen40700
cs253
ece3114
ecmm447
chns3000
math377
itd102
comp9444
comp(2041|9044)
econ0060
econ7230
mgt001371
ecs-323
cs6250
mgdi60012
mdia2012
comm221001
comm5000
ma1008
engl642
econ241
com333
math367
mis201
nbs-7041x
meek16104
econ2003
comm1190
mbas902
comp-1027
dpst1091
comp7315
eppd1033
m06
ee3025
msci231
bb113/bbs1063
fc709
comp3425
comp9417
econ42915
cb9101
math1102e
chme0017
fc307
mkt60104
5522usst
litr1-uc6201.200
ee1102
cosc2803
math39512
omp9727
int2067/int5051
bsb151
mgt253
fc021
babs2202
mis2002s
phya21
18-213
cege0012
mdia1002
math38032
mech5125
07
cisc102
mgx3110
cs240
11175
fin3020s
eco3420
ictten622
comp9727
cpt111
de114102d
mgm320h5s
bafi1019
math21112
efim20036
mn-3503
fins5568
110.807
bcpm000028
info6030
bma0092
bcpm0054
math20212
ce335
cs365
cenv6141
ftec5580
math2010
ec3450
comm1170
ecmt1010
csci-ua.0480-003
econ12-200
ib3960
ectb60h3f
cs247—assignment
tk3163
ics3u
ib3j80
comp20008
comp9334
eppd1063
acct2343
cct109
isys1055/3412
math350-real
math2014
eec180
stat141b
econ2101
msinm014/msing014/msing014b
fit2004
comp643
bu1002
cm2030
联系我们
- QQ: 9951568
© 2021
www.rj363.com
软件定制开发网!