首页
网站开发
桌面应用
管理软件
微信开发
App开发
嵌入式软件
工具软件
数据采集与分析
其他
首页
>
> 详细
CCIT4016代做、代写Python设计编程
项目预算:
开发周期:
发布时间:
要求地区:
Introduction to Data Structures and Algorithms (IDSA, CCIT4016)
HKU SPACE Community College, 2024-2025, Semester 2
Assignment 1 (A1)
(15%)
(Total Marks: 30)
o Finish this work, based on concepts and techniques learnt in our course.
o Students should finish reviewing the related course notes and materials, before doing this assignment.
o Individual work: FINISH THIS WORK ALONE. Student cannot work with others.
* Plagiarism / Collusion / Shared work with others are not allowed. Zero mark will be given, with
possible disciplinary action.
o Students are responsible for ensuring that their files are submitted successfully and properly to SOUL. It
is recommended to download submitted files for self-check before the deadline. Improper file
submissions, such as damaged or wrongly sent files, will not be processed or notified by any means.
o Late Submission is Not Accepted. Zero Mark will be Given. Students should well-plan their time and
schedule. Finish and submit the assignment well before the deadline.
o Questions related to program codes are based on Python programming language, unless specified.
o Follow given instructions and guidelines.
Section A, A1A (10 marks)
Multiple Choice (MC) and Matching Questions, Online (SOUL-Quiz Feature)
o Identify and select the option of choice that "best" completes the statement, matches the item, or
answers the question.
o Number of Attempts Allowed: 2
o Grading method: Highest Grade
o Make sure you have successfully completed, "Finished" and submitted before deadline.
* Attempts must be submitted before time expires, or they are NOT counted. (Zero mark given)
o 5 MC questions and 5 Matching questions. Each question carries the same mark.
Section B, A1B (20 marks): Programming Tasks
* IMPORTANT:
o Source code *.py file must start with comments, including the information of individual student
(student name, student id) as example below, unless specified. E.g. below
o Modify the given Main testing file M*.py file (if any) to display the information of individual student
(student name, student id) as example below, unless specified. E.g. below
=== A1B1, Rectangle Program, by
<20004016> ===
...
...
# A1B1.py, for IDSA A1
# FINISHED by:
, <20004016>
class Rectangle: # define the class of Rectangle
2 / 5
General requirements (unless further specified):
o Students should handle special cases, for examples: empty list, one-element list, etc.
o Proper brief comments are required, at least at the top of each source code file.
o Proper indentations are required in writing program codes.
o All related files (including *.py) should be working in the same folder.
o Python list is mainly used to hold data elements as an array in our course and this assessment.
DO NOT use methods of Python’s list (such as list.append() or list.insert() etc.),
inheritance in OOP, or other non-taught approaches in our course, unless specified.
Given Materials:
o This assignment document.
o Python files A1B1.py and A1B2.py: to be modified and completed by student.
o Also modify top comments for your STUDENT INFO.
o DO NOT modify the given portions unless specified, including the given methods if any.
o Python files MA1B1.py and MA1B2.py: the main files for basic running and testing.
o DO NOT modify these given main test files, except the STUDENT INFO part.
A1B1 (10 marks)
Develop a Fixed-Size Array-List, with the given Python file A1B1.py.
o In this part, students are required to implement a Fixed-Size version of Array-List:
o No need to enlarge the list if it is full.
o GIVEN an uncompleted Fixed-Size Array-List in A1B1.py (based on the one in our lecture notes,
AList.py), with implemented methods below:
GIVEN Operations (Class AList) Description
__init__(): Initiate/create a new Array-List (constructor / initializer)
* This code sample is in Python-style
sizeL():int Get and return the size of the List (total number of elements)
getL(pos):elt Get and return the element in position pos without removal
- If failed, return null/None; e.g. pos is out of range
insertL(elt,pos): Insert a new element elt into position pos
- If list is full, console display "
- Failed INSERT"
Do nothing if this task cannot be done, including if pos is out of range
or other exceptional cases
removeL(pos):elt Remove and return the element elt in position pos
- If failed, return null/None; e.g. pos is out of range
displayL(): Display all elements of the list in order
* Remark: pos (position of element in list) starts from 1 in our course (not 0 as index in Python list)
3 / 5
o Complete the Fixed-Size Array-List with the following Extra Operations (methods of the class):
o At least one line of simple comment for each extra operation required
Operations (Class AList) Description
appendL(elt): Insert/Append a new element elt into the end of the current list
o If list is full, console display "
- Failed APPEND"
o Do nothing if this task cannot be done, including if pos is out of
range or other exceptional cases
searchLastL(elt):int Search & return the position of the last occurrence of an input
searching element elt. (* Position starts from 1)
o Return -1 if this task cannot be done, including the searching
element does not exist in the list.
isEmptyL():bool Check if the list is empty or not
Return boolean True if the list is empty, otherwise False
isFullL():bool Check if the list is already full or not, for our fixed-size list
Return True if the list is full, otherwise return False
clearL(): Clear the whole list (remove/delete all elements)
Sample console display output of executing the main testing program MA1B1.py
=== A1B1, Fixed-Sized ArrayList, by
===
--- 0. new AL
isFullL()?:False, isEmptyL()?:True
>>> AList Display(Head/Left), size/last<0>, capacity<4>:
--- 1. insertL
-D?
- Failed INSERT
>>> AList Display(Head/Left), size/last<4>, capacity<4>:
> K > A > B > C
--- 2. appendL:
-P?
- Failed APPEND
>>> AList Display(Head/Left), size/last<4>, capacity<4>:
> K > A > C > K
------
searchLastL('D'), pos:-1
------
searchLastL('A'), pos:2
--- 3. getL(myL.searchLastL(myL.removeL(1))), elt:K
>>> AList Display(Head/Left), size/last<3>, capacity<4>:
> A > C > K
------
searchLastL('C'), pos:2
------
searchLastL('P'), pos:-1
=== Program ends ===
4 / 5
A1B2 (10 marks)
Develop a Doubly-Linked-List, with the given Python file A1B2.py.
o Each node in Doubly-Linked-List has two links: one for the next node as in singly-linked list, the other
for the previous node. The head node has no previous link and the tail node has no next link. This is
implemented as a Python class DLNode and given in our Python file.
o Some operations could be done efficiently with this Doubly-Linked-List, which require tracing
backward (the previous node of the current node).
o Given an uncompleted Doubly-Linked-List in A1B2.py (based on the one in our lecture notes,
LList.py), with implemented methods below:
Given Operations (Class DLList) Description
__init__(): Create and initiate a new Doubly-Linked-List (constructor)
appendDL(elt): Append/Insert element elt as a new tail
displayDL(): Traverse & display node values, starting from head in forward order
displayBwDL(): Traverse & display node values, starting from tail in backward order
o Complete the Doubly-Linked-List with the following Extra Operations (methods of the class):
o At least one line of simple comment for each extra operation required
Operations (Class DLList) Description
getNextFwDL(refElt):elt Get & return (without remove) the next element of a reference
element refElt, starting from head in forward order
o Return None if no element can be returned
getPrevBwDL(refElt):elt Get & return (without remove) previous element of reference
element refElt, starting from tail in backward order
o Return None if no element can be returned
removeNextFwDL(refElt):elt Remove & return the next element elt of a reference element
refElt, starting from head in forward order
o Return None if no element can be removed and returned
- A B C - headN tailN
5 / 5
Sample console display output of executing the main testing program MA1B2.py
=== === A1B2, DLList program, by
===
--- 1. List with Insert items <8,3,1,2,7,4,9> ---
>>> DOUBLY-Linked-List Display: >
... head <8>, tail <9>:
> 8 > 3 > 1 > 2 > 7 > 4 > 9
<<< DOUBLY-Linked-List Display, Backwards: <<
FROM ... tail <9>, head <8>
< 9 < 4 < 7 < 2 < 1 < 3 < 8
------
getPrevBwDL('2'), elt:1
------
getNextFwDL('9'), elt:None
------
getNextFwDL('7'), elt:4
--- 2. removeNextFwDL('4'), elt:9
>>> DOUBLY-Linked-List Display: >
... head <8>, tail <4>:
> 8 > 3 > 1 > 2 > 7 > 4
<<< DOUBLY-Linked-List Display, Backwards: <<
FROM ... tail <4>, head <8>
< 4 < 7 < 2 < 1 < 3 < 8
------
getPrevBwDL('8'), elt:None
------
getNextFwDL('1'), elt:2
=== Program ends ===
SUBMISSION:
o Check and follow requirements and instructions, including to follow the required naming of files.
o Run, Debug, Test and Evaluate your program based on the requirements.
o Submit ALL related .py files to SOUL:
o A1B1.py, MA1B1.py
o A1B2.py, MA1B2.py
o Do NOT compress/zip or rename the files. Submission work not following requirements may be
penalized or not be assessed.
~ END ~
软件开发、广告设计客服
QQ:99515681
邮箱:99515681@qq.com
工作时间:8:00-23:00
微信:codinghelp
热点项目
更多
代写tc2343、代做python设计程...
2025-04-15
6412ele代写、代做c/c++,pyth...
2025-04-15
fit5221代写、代做python语言编...
2025-04-15
代写assessment 3 – “annota...
2025-04-15
代写 comp 310、代做 java/pyt...
2025-04-14
代做 program、代写 java 语言...
2025-04-14
program 代做、代写 c++/pytho...
2025-04-14
代写review questions – ad/a...
2025-04-14
代写eng5009 advanced control...
2025-04-14
代做ent204tc corporate entre...
2025-04-14
代写assignment st3074 ay2024...
2025-04-14
代做cs3243 introduction to a...
2025-04-14
代做empirical finance (bu.23...
2025-04-14
热点标签
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
软件定制开发网!