首页
网站开发
桌面应用
管理软件
微信开发
App开发
嵌入式软件
工具软件
数据采集与分析
其他
首页
>
> 详细
MSCI537编程设计讲解、辅导Data Sourcing、Python程序设计讲解 辅导R语言编程|讲解R语言程序
项目预算:
开发周期:
发布时间:
要求地区:
Lancaster University, Department of Management Science
MSCI530/MSCI537: Data Sourcing, Handling and Programming
Coursework (70% for MSCI530 and 100% for MSCI537)
Deadline: 12/1/2021 10AM Michaelmas Term Maximum Marks: 100
1 Coursework Description
This coursework is composed of three parts, and you are expected to submit six files. You have
been given the flexibility to structure the code in the way that you think is best following the
principles of re-usability, maintainability, information hiding and clarity.
Part 1 (20 Marks)
For this part, you should submit a file containing a working version of your code. The name of
this file should be part1.ipynb (programmed in Python with Jupyter Notebook as an Editor).
You should also submit a document file named part1.docx containing a copy of your code. You
should not import any modules/packages for this part.
Fiz-Buz is a mathematical game, often encouraged by school teachers. In this game the players
take turns to count through numbers (1, 2, 3 etc). If a number either contains a 5, or if it is
divisible by 5 then a player must say “Fiz” instead of that number. If it either contains a 7, or is
divisible by 7, then they must say “Buz” instead of that number. If a number meets both “Fiz”
and “Buz” criteria, then they must say “Fizbuz”.
Task 1: (12 marks) Write a Fiz-Buz simulator that will calculate whether a number should be
represented by itself, “Fiz”, “Buz” or “Fizbuz”. The simulator should perform this calculation for
numbers between 1 and n
2
, where n is a user input, and the results should be displayed in a n × n
table. This table should contain a heading containing the title of the program and your name (in
the centre), and it should be surrounded by a box made up of ‘-’ and ‘|’ characters. The output of
the program should thus be as shown below for n = 10.
The programs should run without errors and meet the above specification (i.e. by correctly
identifying Fiz and Buz numbers, and formatting the output correctly as required above).
Please Turn Over
MSCI530/MSCI537 Data Sourcing, Handling and Programming Page 2 of 4
Task 2: (8 marks) These marks will go to programs that are (i) well commented, and have a
good style (neatly laid out, with sensible identifiers); and (ii) well structured (for example, by
following good programming practices and using functions where appropriate) to show evidence of
well thought out design. Additionally, the quality of the code will be considered (i.e. some marks
will be given for compact efficient algorithms, and compact code).
Part 2 (40 Marks)
For this part, you should submit a file containing a working version of your code. The name
of this file should be part2.py (programmed in Python with Spyder as an Editor). You should
also submit a document file named part2.docx containing your answer to the question below (6
pages maximum) and your code (as an appendix - no page limit). In case you want to import any
packages apart from pandas, matplotlib, numpy, math, random, tkinter, pickle, seaborn and norm
from scipy.stats, you should contact the module leader first.
A newly appointed health minister has heard reports that there are some hospitals in England
where the average length of stay of patients is over 2 weeks, whereas in many others the average
length of stay is under 1 week. This sounds rather odd at face value, but he realises that he does
not understand much about the activity levels of hospitals, and would like to improve his level of
understanding. Suppose that the data file ‘Hospital.csv’ contains the following data for the 303
NHS hospitals in England:
• Hospital – Code identifying hospital
• ALLPatients – Patients admitted in last year
• Males – Male patients admitted in last year
• Females – Female patients admitted in last year
• Emergencies – Emergency patients admitted in last year
• LOS – average length of stay of patients in last year
• Age – average age of patients admitted last year
• LOS PY – average length of stay of patients in previous year
• Age PY – average age of patients admitted previous year
Draw a sample of size 100 from this population and investigate your sample using Python. As at
the lecture, use random state to set your unique starting point for the random number generator.
For this coursework question use the last four digits of your library card PLUS 1, i.e. if your
library card ends ‘4321’ type in ‘4322’, and if your library card ends ‘4329’ type in ‘4330’. Record
these four digits at the top of your answer.
Task 1: (10 marks) In no more than 6 pages describe the main features of your sample as if
to a non-statistical health minister. You should include main features of individual variables and
of the relationships between them. You must include Python numerical and graphical output.
(The clarity and content of your report are both important - grades will be awarded on quality of
technical analysis. Your report should not be a discussion of how you used Python to perform the
calculations. You also need to think carefully about which output is relevant to use in the report).
Task 2: (30 marks) These marks will go to programs that are well structured (including employing
functional and object oriented programming concepts), well commented, intuitive to use (i.e.
Please Turn Over
MSCI530/MSCI537 Data Sourcing, Handling and Programming Page 3 of 4
straightforward for me to run your code), generalisable, and flexible (i.e. provide user options
via a graphical user interface). The program should run without errors and produces the same
output used in your report.
Part 3 (40 Marks)
For this part, you should submit a file containing a working version of your code. The name of
this file should be part3.py (programmed in Python with Spyder as an Editor). You should also
submit a document file named part3.docx containing a copy of your code. In case you want to
import any packages apart from pandas, matplotlib, numpy, math, random, tkinter, pickle, seaborn
and norm from scipy.stats, you should contact the module leader first.
Alex owns an auto repair business and has several employees. In this part, you are to write a
program for Alex that stores/deletes/updates data about employees, calculates and displays the
gross pay and more. The tasks below are designed to help you to develop your program in stages.
Task 1: (2 marks) Write a class named Employee that holds the following data about an employee
in attributes: name (e.g. “Ahmed Kheiri”), ID (e.g. “E182737”), department (e.g. “IT”), job title
(e.g. “Programmer”), hourly pay rate and number of hours worked in a week.
Task 2: (2 marks) Law requires that hourly employees be paid “time-and-a-half” their regular
hourly pay rate for work in excess of 40 hours in a week. Therefore, if the employee has worked
over 40 hours in a week, he or she gets paid extra for all the hours over 40. Otherwise, the overtime
calculation should be skipped. To give an example, if a person’s hourly wage is £12 and he or
she works 60 hours in a week, the person’s gross pay should be £840. Implement a method that
calculates and returns an employee’s gross pay, including any overtime wages.
Task 3: (2 marks) Alex’s company has a reputation for providing excellent fringe benefits. One
of their benefits is a retirement plan for each employee. The company contributes 5 percent of each
employee’s gross pay to their retirement plans. Implement a method that calculates and returns
the company’s contribution to an employee’s retirement account for a week.
Task 4: (2 marks) Now, write a class named ProductionWorker that is a subclass of the Employee
class. This class has an attribute ‘shift’ (a boolean data type). The workday is divided into two
shifts: day shift and night shift. The shift attribute will hold a boolean value representing the shift
that the employee works.
Task 5: (2 marks) Now that you have written the classes, write a code that creates objects of the
two classes and prompts the user to enter data for each of the object’s data attributes, and stores
the data in the objects. Implement the str method for a string representation of the objects.
Task 6: (12 marks) Update your program so that it stores Employee and ProductionWorker
objects in a dictionary. Use the ‘ID’ as the key. The program should present a menu that lets the
user perform the following actions:
• Look up an employee in the dictionary. Suppose each employee has a unique ID, we could
look up and retrieve an employee’s name, department, etc, by entering that employee’s ID
• Search for records, for example, enter a department and display a list of all the employees
and production workers matching that department
Please Turn Over
MSCI530/MSCI537 Data Sourcing, Handling and Programming Page 4 of 4
• Add a new employee to the dictionary (i.e. the new object will be added to the dictionary’s
existing contents)
• Change an existing employee’s name, department, . . . etc. This will allow us to keep the
records up to date
• Delete an employee from the dictionary
• Display all the objects in the dictionary in a suitable table format
• Quit the program
When the program ends, it should pickle the dictionary and save it to a file. Each time the
program starts, it should try to load the pickled dictionary from the file. If the file does not exist,
the program should start with an empty dictionary.
Task 7: (2 marks) Write a function that stores the data about employees and production workers
in a text file named “employee.txt”. The file should contain a record for each employee and
production worker from the created dictionary. Each record will be a collection of the following
fields: ID, name, department, job title, gross pay and shift (i.e. day or night - only applied to
production workers).
Task 8: (12 marks) Design a suitable graphical user interface, and produce suitable plots (e.g.
pie chart showing the distribution of departments).
Task 9: (4 marks) These marks will go to programs that are well structured (using functional
programming concepts and follow good programming practices), well commented and intuitive to
use (i.e. straightforward for me to run your code).
2 Coursework Submission
The coursework deadline is 10:00AM, Tuesday 12th January, 2021. In accordance with University
regulations, work submitted up to three days after the deadline will be classed as late submission
(10 marks will be deducted), and after three days as a non-submission. However, if an extension
is given then the rule applies from the date of the extension. The place to submit your files:
• https://modules.lancaster.ac.uk/mod/assign/view.php?id=1435010 for MSCI530
• https://modules.lancaster.ac.uk/mod/assign/view.php?id=1436880 for MSCI537
3 Plagiarism
You must write your own code. Copying code from other students, previous students or any other
source is plagiarism. According to university rules, instances of plagiarism will be treated very
seriously. Penalties are in line with the institutional framework of the University. We will analyse
the coursework using plagiarism detection software. Your coursework will be checked against that
of the rest of the class, and against that of previous students. In the days following submission, and
at a prearranged time, selected students will be asked to spend a few minutes on Teams where you
will demonstrate your program to me. I will use this opportunity to ask you to provide information
on your program and explain parts of your code.
软件开发、广告设计客服
QQ:99515681
邮箱:99515681@qq.com
工作时间:8:00-23:00
微信:codinghelp
热点项目
更多
urba6006代写、java/c++编程语...
2024-12-26
代做program、代写python编程语...
2024-12-26
代写dts207tc、sql编程语言代做
2024-12-25
cs209a代做、java程序设计代写
2024-12-25
cs305程序代做、代写python程序...
2024-12-25
代写csc1001、代做python设计程...
2024-12-24
代写practice test preparatio...
2024-12-24
代写bre2031 – environmental...
2024-12-24
代写ece5550: applied kalman ...
2024-12-24
代做conmgnt 7049 – measurem...
2024-12-24
代写ece3700j introduction to...
2024-12-24
代做adad9311 designing the e...
2024-12-24
代做comp5618 - applied cyber...
2024-12-24
热点标签
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
软件定制开发网!