精品深夜AV无码一区二区_伊人久久无码中文字幕_午夜无码伦费影视在线观看_伊人久久无码精品中文字幕

代做COMP9021、代寫Python編程設(shè)計(jì)

時(shí)間:2024-07-20  來源:  作者: 我要糾錯(cuò)



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





 

標(biāo)簽:

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

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

    關(guān)于我們 | 打賞支持 | 廣告服務(wù) | 聯(lián)系我們 | 網(wǎng)站地圖 | 免責(zé)聲明 | 幫助中心 | 友情鏈接 |

    Copyright © 2025 kmw.cc Inc. All Rights Reserved. 昆明網(wǎng) 版權(quán)所有
    ICP備06013414號(hào)-3 公安備 42010502001045

    精品深夜AV无码一区二区_伊人久久无码中文字幕_午夜无码伦费影视在线观看_伊人久久无码精品中文字幕
    <samp id="e4iaa"><tbody id="e4iaa"></tbody></samp>
    <ul id="e4iaa"></ul>
    <blockquote id="e4iaa"><tfoot id="e4iaa"></tfoot></blockquote>
    • <samp id="e4iaa"><tbody id="e4iaa"></tbody></samp>
      <ul id="e4iaa"></ul>
      <samp id="e4iaa"><tbody id="e4iaa"></tbody></samp><ul id="e4iaa"></ul>
      <ul id="e4iaa"></ul>
      <th id="e4iaa"><menu id="e4iaa"></menu></th>
      亚洲视频1区2区| 自拍偷拍国产精品| 久久网这里都是精品| 亚洲国产裸拍裸体视频在线观看乱了 | 亚洲图片自拍偷拍| 色屁屁一区二区| 国产精品久久久久aaaa樱花| 成人av在线资源网站| 国产精品久久久久久久久搜平片| 国产成人一区在线| 欧美国产综合色视频| 成人av网站在线| 亚洲精品福利视频网站| 欧美在线一区二区三区| 日韩精品色哟哟| 精品国精品自拍自在线| 国产传媒一区在线| 亚洲精品免费一二三区| 91精品婷婷国产综合久久| 日本不卡1234视频| 国产婷婷一区二区| 色狠狠一区二区| 蜜臀av一区二区在线观看| 欧美精品一区二区三区四区| 国产v综合v亚洲欧| 亚洲狠狠丁香婷婷综合久久久| 欧美日韩你懂的| 国产一区三区三区| 亚洲欧洲性图库| 欧美电影在哪看比较好| 国产精品一区二区免费不卡| 亚洲日本va午夜在线电影| 欧美精品粉嫩高潮一区二区| 国产伦精品一区二区三区在线观看| 国产精品伦一区二区三级视频| 精品视频999| 高清日韩电视剧大全免费| 亚洲大片精品永久免费| 国产午夜一区二区三区| 欧美人妇做爰xxxⅹ性高电影| 国产大陆精品国产| 午夜视频久久久久久| 中文av字幕一区| 欧美一区二区精品久久911| 白白色亚洲国产精品| 久久激五月天综合精品| 亚洲成人免费影院| 亚洲色图19p| 国产精品视频线看| 精品国产一区二区在线观看| 欧美在线观看一二区| 成人免费黄色在线| 经典三级一区二区| 免费黄网站欧美| 亚洲一区视频在线| 亚洲日本丝袜连裤袜办公室| 久久久国际精品| 日韩精品中文字幕在线不卡尤物| 欧美视频在线一区| 色噜噜狠狠成人中文综合| 国产成a人亚洲| 国产九色sp调教91| 国产呦萝稀缺另类资源| 精品伊人久久久久7777人| 日韩在线一二三区| 五月天视频一区| 天堂一区二区在线| 视频一区二区不卡| 午夜精品在线看| 亚洲高清免费视频| 亚洲一区二区精品久久av| 亚洲综合色自拍一区| 亚洲在线视频免费观看| 亚洲一区二区三区四区不卡| 亚洲精品自拍动漫在线| 亚洲在线成人精品| 午夜国产精品一区| 免费的国产精品| 精品亚洲porn| 粉嫩蜜臀av国产精品网站| 成人午夜av在线| 91麻豆国产在线观看| 日本韩国一区二区| 欧美福利视频一区| 日韩欧美精品在线视频| 久久五月婷婷丁香社区| 中文字幕不卡在线| 亚洲精品日韩综合观看成人91| 亚洲资源在线观看| 欧美a级理论片| 丁香婷婷综合网| 色综合中文综合网| 日韩精品国产欧美| 国产一区美女在线| a亚洲天堂av| 欧美日韩高清一区二区三区| 日韩色在线观看| 中文字幕精品—区二区四季| 一区二区不卡在线视频 午夜欧美不卡在| 一区二区三区成人| 精品在线播放午夜| 99riav久久精品riav| 91精品国产综合久久蜜臀| 久久精品人人做人人爽人人| 亚洲精品国产a| 极品瑜伽女神91| 日本高清视频一区二区| 欧美变态tickling挠脚心| 中文字幕在线免费不卡| 免费在线观看不卡| 色综合久久中文综合久久97 | 91极品视觉盛宴| 精品成人a区在线观看| 最新中文字幕一区二区三区 | 91欧美一区二区| 欧美刺激午夜性久久久久久久| 国产精品不卡在线| 毛片av一区二区| 欧美最猛性xxxxx直播| 国产肉丝袜一区二区| 日韩av二区在线播放| 色噜噜久久综合| 欧美国产日韩精品免费观看| 日本sm残虐另类| 欧美视频一区在线| 亚洲女女做受ⅹxx高潮| 国产a级毛片一区| 精品播放一区二区| 日韩精品一二三四| 91精品国产色综合久久不卡蜜臀 | 亚洲欧美福利一区二区| 精品在线免费观看| 欧美日韩视频在线一区二区| 日韩一区欧美小说| 成人免费视频免费观看| 欧美不卡一二三| 日本不卡123| 欧美日韩精品综合在线| 亚洲欧美aⅴ...| 91一区二区在线| 中文字幕一区二区三区在线观看| 国产伦理精品不卡| 久久久久久久久99精品| 国产曰批免费观看久久久| 精品美女在线播放| 奇米影视一区二区三区小说| 欧美理论片在线| 日韩电影在线一区| 日韩小视频在线观看专区| 日本午夜精品视频在线观看| 欧美二区三区91| 日韩成人伦理电影在线观看| 在线不卡免费av| 奇米四色…亚洲| 精品sm在线观看| 国产成人丝袜美腿| 成人免费一区二区三区在线观看| 91女神在线视频| 午夜亚洲国产au精品一区二区| 欧美三级资源在线| 日韩精品每日更新| 欧美mv日韩mv国产网站app| 国产成人亚洲综合a∨婷婷图片| 中文字幕欧美激情| 色综合网站在线| 日韩电影一区二区三区四区| 久久久久久影视| 色综合天天狠狠| 五月激情综合色| 国产调教视频一区| 在线观看国产日韩| 精品一区二区三区视频在线观看| 国产精品日日摸夜夜摸av| 欧美伊人精品成人久久综合97| 老司机一区二区| 亚洲婷婷在线视频| 日韩视频一区二区三区在线播放| 国产aⅴ精品一区二区三区色成熟| 依依成人精品视频| 欧美白人最猛性xxxxx69交| 成人av网址在线观看| 日本成人在线网站| 亚洲图片欧美激情| 精品国产亚洲一区二区三区在线观看| 福利电影一区二区| 天堂成人免费av电影一区| 国产日产精品1区| 欧美绝品在线观看成人午夜影视| 国产99久久久国产精品| 视频在线观看国产精品| 亚洲欧洲99久久| 久久亚洲二区三区| 欧美精品黑人性xxxx| av一区二区三区在线| 久久69国产一区二区蜜臀| 亚洲激情一二三区| 欧美激情在线一区二区三区| 日韩欧美亚洲一区二区| 欧美日韩精品欧美日韩精品一 | 日韩午夜激情视频|