亚洲十八**毛片_亚洲综合影院_五月天精品一区二区三区_久久久噜噜噜久久中文字幕色伊伊 _欧美岛国在线观看_久久国产精品毛片_欧美va在线观看_成人黄网大全在线观看_日韩精品一区二区三区中文_亚洲一二三四区不卡

代做COMP9021、代寫Python編程設計

時間:2024-07-20  來源:  作者: 我要糾錯



COMP9021 Principles of Programming 
Term 2, 2024 
Assignment 2 
Worth 13marks and due Week 11 Monday @ 10am 
1. General Matters 
 
1.1 Aim 
The purpose of this assignment is to: 
• Develop your problem-solving skills. 
• Design and implement the solution to a problem in the form of a medium sized Python program. 
• Analyse the various features of a labyrinth, represented by a particular coding of its basic elements 
into numbers, from the set {0, 1, 2, 3} only, stored in a text file. 
• Check that the input text file is correct and represents a labyrinth. 
• Output the labyrinth features nicely. 
• Use object-oriented programming. 
 
1.2 Marking 
This assignment is worth 13 marks distributed as follows: 
 2 
 
 
Your program will be tested against several inputs. For each test, the auto-marking script will let your 
program run for 30 seconds. The outputs of your program should be exactly as indicated. 
 
1.3 Due Date and Submission 
Your programs will be stored in a file named labyrinth.py. The assignment can be submitted more than 
once. The last version just before the due date and time will be marked (unless you submit late in which 
case the last late version will be marked). 
Assignment 2 is due Week 11 Monday 5 August 2024 @ 10:00am (Sydney time). 
Please note that late submission with 5% penalty per day is allowed up to 5 days from the due date, that 
is, any late submission after Week 11 Saturday 10 August 2024 @ 10:00am will be discarded. 
Please make sure not to change the filename labyrinth.py while submitting by clicking on [Mark] button in 
Ed. It is your responsibility to check that your submission did go through properly using Submissions link in 
Ed otherwise your mark will be zero for Assignment 2. 
 
1.4 Reminder on Plagiarism Policy 
You are permitted, indeed encouraged, to discuss ways to solve the assignment with other people. Such 
discussions must be in terms of algorithms, not code. But you must implement the solution on your own. 
Submissions are scanned for similarities that occur when students copy and modify other people’s work or 
work very closely together on a single implementation. Severe penalties apply. 
 
2. Description 
The representation of the labyrinth is based on a coding with only the four digits 0, 1, 2 and 3 such that: 
 
• 0 codes points that are connected to neither their right nor their below neighbours: 
• 1 codes points that are connected to their right neighbours but not to their below ones: 
• 2 codes points that are connected to their below neighbours but not to their right ones: 
• 3 codes points that are connected to both their right and below neighbours: 
 
A point that is connected to none of their left, right, above, and below neighbours represents a pillar: 
 
Analysing the labyrinth will also allow to represent: 
 
• cul-de-sac: 
• entry-exit path: 
 3 
 
 
3. Examples 
 
3.1 First Example 
The file named labyrinth_1.txt contains the following: 
 
1 0 2 2 1 2 3 0 
3 2 2 1 2 0 2 2 
3 0 1 1 3 1 0 0 
2 0 3 0 0 1 2 0 
3 2 2 0 1 2 3 2 
1 0 0 1 1 0 0 0 
 
As per the coding above, labyrinth_1.txt will look like the following: 
 
 
Here is a possible interaction: 
 4 
 
 
3.2 Second Example 
The file named labyrinth_2.txt contains the following: 
 
022302120222 
222223111032 
301322130302 
312322232330 
001000100000 
 
As per the coding above, labyrinth_2.txt will look like the following: 
 
 
 
Here is a possible interaction: 
 
 
 
 5 
 
 
3.3 Third Example 
The file named labyrinth_3.txt contains the following: 
 
31111111132 
21122131202 
33023022112 
20310213122 
31011120202 
21230230112 
30223031302 
03122121212 
22203110322 
22110311002 
11111101110 
 
As per the coding above, labyrinth_3.txt will look like the following: 
 
Here is a possible interaction: 
 6 
 
 
3.4 Fourth Example 
The file named labyrinth_4.txt contains the following: 
 
111120 
112020 
002020 
002010 
001110 
 
As per the coding above, labyrinth_4.txt will look like the following: 
 
 
 
Here is a possible interaction: 
 
 
 
 7 
 
 
3.5 Fifth Example 
The file named labyrinth_5.txt contains the following: 
 
 1 1 2 
 1 12 
 
 1 1 0 
 
 
As per the coding above, labyrinth_5.txt will look like the following: 
 
 
 
Here is a possible interaction: 
 
 
 
 8 
 
 
3.6 Sixth Example 
The file named labyrinth_6.txt contains the following: 
 
0111221210021212201201323330200 
1131011210301210323130331302310 
3300200323203011010332232320332 
2330312230220302032203223112310 
1211020213223110101302032332212 
1112222331300131013312312223130 
1110120222130303102210113130100 
0020320223200020113011131202302 
3213100301021111202122030110112 
1200320130030313001031302312110 
0310130300203000312021011212020 
3131210323320222322212332031120 
2021033213003230103112331130222 
1013300313133312220131222100010 
1231322020123133221023110302002 
3322231133223020311032001102310 
2323101332332011010132023031132 
2200112102133112231003320012120 
2130210032120230313010200102112 
2311003320123302322223032120112 
0201320233130133202333323012120 
1003010311132003122332112221132 
2032100103021312110202200332310 
3211202310233321202022122021022 
1200330103010322222131033003000 
1121200200313110310030131100332 
0012021023310003332301123031222 
0120302110232113312232012023020 
2303222021330232031311210131312 
0101112200130031003120203121102 
2012100113233120321011002012220 
0010322001332202013202312122110 
0213000131303132112301110130112 
1222303101032032301032210302110 
1220131300113200003021222120012 
1333010013001231321110022323022 
3021223221133030131221100102210 
2013320130211320203021000311312 
0303003010033021320232203222020 
2030233001202311110121110133220 
1001011011001101100000010100100 
 9 
 
 
As per the coding above, labyrinth_6.txt will look like the following: 
 
 10 
 
 
Here is a possible interaction: 
 
 
 
 11 
 
 
4. Detailed Description 
 
4.1 Input 
The input is expected to consist of ydim lines of xdim members of {0, 1, 2, 3}, where x dim and ydim are at least 
equal to 2 and at most equal to 31 and 41, respectively, with possibly lines consisting of spaces only that 
will be ignored and with possibly spaces anywhere on the lines with digits. 
The xth digit n of the yth line, with 0 ≤ x < xdim and 0 ≤ y < ydim, is to be: 
• associated with a point situated x * 0.5 cm to the right and y * 0.5 cm below an origin, 
• connected to the point 0.5 cm to its right if n = 1 or n = 3, and 
• connected to the point 0.5 cm below itself if n = 2 or n = 3. 
The last digit on every line with digits (that is, not on blank lines) cannot be equal to 1 or 3, and the digits 
on the last line with digits cannot be equal to 2 or 3, which ensures that the input encodes a labyrinth, 
that is, a grid of width (xdim - 1) * 0.5 cm and of height (ydim - 1) * 0.5 cm (hence of maximum width 15 cm 
and of maximum height 20 cm), with possibly gaps on the sides and inside. 
A point not connected to any of its neighbours is thought of as a pillar and a point connected to at least 
one of its neighbours is thought of as part of a wall. 
We talk about inner point to refer to a point that lies (x + 0.5) * 0.5 cm to the right of and (y + 0.5) * 0.5 
cm below the origin with 0 ≤ x < xdim - 1 and 0 ≤ y < ydim - 1. 
Practically, the input will be stored in a text file as shown in the six examples above. The program will exit 
immediately if the input is not as expected. 
 
4.2 Output 
Consider executing from the Python prompt the statement from labyrinth import * followed by the 
statement lab = Labyrinth(filename). In case filename does not exist in the working directory, then Python 
will raise a FileNotFoundError exception, that does not need to be caught. Assume that filename does 
exist (in the working directory). If the input is incorrect in that it does not contain only digits in {0, 1, 2, 3} 
besides spaces, or in that it contains either too few or too many nonblank lines, or in that some nonblank 
lines contain too many or too few digits, or in that two of its nonblank lines do not contain the same 
number of digits, then the effect of executing lab = Labyrinth(filename) should be to generate a 
LabyrinthError exception that reads: 
 
 
 12 
 
 
If the previous conditions hold but the further conditions spelled out above for the input to qualify as a 
labyrinth (that is, the condition on the last digit on every line with digits and the condition on the digits on 
the last line) do not hold, then the effect of executing lab = Labyrinth(filename) should be to generate a 
LabyrinthError exception that reads: 
 
 
 
If the input is correct and represents a labyrinth, then lab = Labyrinth(filename) followed by 
lab.display_features() should have the effect of outputting the following: 
1. the number of gates, that is, the number of consecutive points on one of the four sides of the 
labyrinth that are not connected, 
2. the number of sets of connected walls, 
3. the number of inner points that cannot be accessed from any gate, starting from the point in the 
middle of a gate and going from inner points to neighbouring inner points, 
4. the number of maximal areas that can be accessed from at least one gate (the number of 
accessible inner points is at most equal to the number of gates), 
5. the number of accessible cul-de-sacs (a cul-de-sac is a maximal set S of connected inner points that 
can all be accessed from the same gate g and such that for all points p in S, if p has been accessed 
from g for the first time, then either p is in a dead end or moving on without ever getting back 
leads into a dead end), and 
6. the number of entry-exit paths with no intersections not to cul-de-sacs consisting of a maximal set 
S of connected inner points that go from a gate to another (necessarily different) gate and such that 
for all points p in S, there is only one way to move on from p without getting back and without 
entering a cul-de-sac, in other words, the resulting path is choice-free, that is, such that leaving the 
path, at any inner point where that is possible, immediately leads into a cul-de-sac. 
 
The above should be displayed exactly as described below. 
A first line that reads one of: 
The labyrinth has no gate. 
The labyrinth has a single gate. 
The labyrinth has N gates. 
with N an appropriate integer at least equal to 2. 
 13 
 
 
A second line that reads one of: 
The labyrinth has no wall. 
The labyrinth has walls that are all connected. 
The labyrinth has N sets of walls that are all connected. 
with N an appropriate integer at least equal to 2. 
 
A third line that reads one of: 
The labyrinth has no inaccessible inner point. 
The labyrinth has a unique inaccessible inner point. 
The labyrinth has N inaccessible inner points. 
with N an appropriate integer at least equal to 2. 
 
A fourth line that reads one of: 
The labyrinth has no accessible area. 
The labyrinth has a unique accessible area. 
The labyrinth has N accessible areas. 
with N an appropriate integer at least equal to 2. 
 
A fifth line that reads one of: 
The labyrinth has no accessible cul-de-sac. 
The labyrinth has accessible cul-de-sacs that are all connected. 
The labyrinth has N sets of accessible cul-de-sacs that are all connected. 
with N an appropriate integer at least equal to 2. 
 
A sixth line that reads one of: 
The labyrinth has no entry-exit path with no intersection not to cul-de-sacs. 
The labyrinth has a unique entry-exit path with no intersection not to cul-de-sacs. 
The labyrinth has N entry-exit paths with no intersections not to cul-de-sacs. 
with N an appropriate integer at least equal to 2. 
 
請加QQ:99515681  郵箱:99515681@qq.com   WX:codinghelp





 

標簽:

掃一掃在手機打開當前頁
  • 上一篇:DDES9903代寫、代做Python,c/c++編程
  • 下一篇:CIT 593代做、代寫Java/c++語言編程
  • 無相關信息
    昆明生活資訊

    昆明圖文信息
    蝴蝶泉(4A)-大理旅游
    蝴蝶泉(4A)-大理旅游
    油炸竹蟲
    油炸竹蟲
    酸筍煮魚(雞)
    酸筍煮魚(雞)
    竹筒飯
    竹筒飯
    香茅草烤魚
    香茅草烤魚
    檸檬烤魚
    檸檬烤魚
    昆明西山國家級風景名勝區
    昆明西山國家級風景名勝區
    昆明旅游索道攻略
    昆明旅游索道攻略
  • 短信驗證碼平臺 理財 WPS下載

    關于我們 | 打賞支持 | 廣告服務 | 聯系我們 | 網站地圖 | 免責聲明 | 幫助中心 | 友情鏈接 |

    Copyright © 2025 kmw.cc Inc. All Rights Reserved. 昆明網 版權所有
    ICP備06013414號-3 公安備 42010502001045

    日韩精品一区在线| 波多野结衣久久精品| 久久激情综合| 青春草视频在线| 日韩欧美在线综合网| 国产精品国产馆在线真实露脸| 中文字幕亚洲影视| 免费羞羞视频网站| 捆绑紧缚一区二区三区视频| 自拍一区在线观看| 欧美一区二区免费视频| 蜜桃一区二区三区在线观看| 99国产精品久久久久久久成人热 | 丁香天五香天堂综合| 欧美一区2区| 成人午夜激情片| 69ww免费视频播放器| 国产乱码精品一区二区三区亚洲人| 亚洲国产精品久久久天堂| 成人在线视频免费观看| 日本伊人久久| 免费毛片在线看片免费丝瓜视频| 九九九伊在人线综合| 成人福利视频在| 免费在线观看羞羞视频| 日本高清好狼色视频| 国产尤物一区二区| 久久精品66| 黄污视频在线观看| 开心丁香婷婷深爱五月| 亚洲一区免费观看| 精品福利在线看| 啪啪av大全导航福利网址| 在线黄色国产电影| 人成免费电影一二三区在线观看| 中文字幕第12页| 七七久久电影网| 天天综合网网欲色| 久久亚洲免费视频| 亚洲高清免费观看高清完整版在线观看 | 欧美高清在线精品一区| 中文字幕一区二区在线观看| 欧美三级日韩三级国产三级| 久久久久久久综合日本| 亚洲一本视频| 日日狠狠久久偷偷综合色| 国产成人精品一区二区三区在线| 最近97中文超碰在线| 制服丝袜成人动漫| 高清性色生活片在线观看| 尤物在线网址| 第一页在线观看| 日韩在线视频一区二区三区| 91视频一区| 久久99久久99精品免视看婷婷| 久久经典综合| 亚洲一区成人在线| 欧美视频在线视频| 天天操天天碰| 日韩欧美一区二区免费| 一本大道香蕉8中文在线视频 | 中文字幕亚洲精品视频| 日韩免费视频一区| 欧美日韩视频在线一区二区| 日本a级黄色| 国产最顶级的黄色片在线免费观看| 无套内精的网站| 最猛黑人系列在线播放| 成人全视频在线观看在线播放高清 | 日日夜夜精品一区| 亚洲精品一二三区区别| 中文字幕欧美国产| 国产粉嫩一区二区三区在线观看| 精品无码三级在线观看视频 | 成人动漫一区二区三区| 91九色porn在线资源| 2021国产精品久久精品| 欧美一级高清片| 九九九精品视频| 国产成人综合在线观看| 色综合色综合色综合色综合色综合| 日韩欧美在线一区二区三区| 成年人视频网站在线| 日本精品黄色| 2022国产精品视频| 亚洲日本一区二区| 欧美日韩视频专区在线播放| 天堂资源av| 在线观看三级视频| 日韩在线成人| 韩日av一区二区| 嫩草懂你的影院| 精品盗摄女厕tp美女嘘嘘| 日韩影院在线观看| 日本夜爽爽一二区| 久久亚洲黄色| 亚洲激情综合网| 麻豆国产一区二区三区四区| 91丨porny丨国产| www.99热.com| 日韩精品一区二区三区中文| 国产宾馆实践打屁股91| 四虎最新网站| 日韩大尺度在线观看| 亚洲尤物视频在线| 爱情电影社保片一区| 青青视频一区二区| 成人亚洲精品久久久久软件| 制服丝袜中文字幕亚洲| 美女网站视频在线| 日韩伦理一区| 亚洲乱码国产乱码精品精98午夜| 制服诱惑亚洲| 亚洲欧美怡红院| 白浆视频在线观看| 欧美经典一区二区三区| 青青国产精品| 欧美性大战久久久久久久蜜臀 | 欧美精品在线观看一区二区| 久久综合久久99| 免费成人av| 少女频道在线观看免费播放电视剧| 久久久精品一品道一区| 思思99re6国产在线播放| 亚洲免费伊人电影| 黄网站在线观看| 五月天欧美精品| 欧美 亚欧 日韩视频在线 | 亚洲精品高清视频在线观看| 97色伦图片97色伦在线电影| 禁久久精品乱码| 美女国产在线| 日韩写真福利视频在线| 国产欧美日韩激情| 成人全视频在线观看在线播放高清 | 欧美日韩在线亚洲一区蜜芽| 8x8ⅹ拨牐拨牐拨牐在线观看| 亚洲激情在线激情| 欧美一区亚洲| 黄色在线网站噜噜噜| 欧美喷水一区二区| 久久福利视频一区二区| 亚洲精品a区| 偷拍一区二区三区四区| 欧美亚洲二区| 国产精品色在线观看| 99久精品视频在线观看视频| 领导边摸边吃奶边做爽在线观看| 91色乱码一区二区三区| 俺来也官网欧美久久精品| bt7086福利一区国产| 羞羞视频在线观看免费| 国产日韩欧美a| 欧美日韩中文一区二区| aa视频在线观看| 性开放的欧美大片| 国产自产v一区二区三区c| 欧美人与性动交α欧美精品图片| 亚洲男人的天堂在线aⅴ视频| 欧美.www| 天堂久久午夜av| 不卡一区二区三区四区| 男人和女人做事情在线视频网站免费观看| 五月天丁香久久| 蜜臀av性久久久久蜜臀aⅴ流畅| av在线电影网| 亚洲国产成人高清精品| 精品亚洲成a人| 97人人澡人人爽91综合色| 欧美高清你懂得| 国内外成人在线视频| 好看不卡的中文字幕| 日韩在线精品强乱中文字幕| 呦呦在线视频| 亚洲成人在线网站| 天堂av在线一区| 天堂√8在线中文| 中文字幕在线网| 精品美女永久免费视频| 国产不卡视频一区| 日日噜噜夜夜狠狠视频欧美人 | 99在线播放| 一区二区三区成人在线视频| 一区二区乱码| 亚洲精品一卡二卡| 午夜日韩影院| 欧美视频一区二区三区…| 精品久久ai| 天天噜噜噜噜噜噜| 亚洲国产欧美另类丝袜| 久久综合九色欧美综合狠狠 | 国产美女精品一区二区三区| 波多野结衣中文一区| 午夜精品福利一区二区蜜股av| 亚洲一区二区欧美日韩| 久久综合久久综合亚洲| 精品日产乱码久久久久久仙踪林| av网站在线播放| 婷婷五月在线视频| 欧洲精品二区|