国产人妻人伦精品_欧美一区二区三区图_亚洲欧洲久久_日韩美女av在线免费观看

合肥生活安徽新聞合肥交通合肥房產(chǎn)生活服務(wù)合肥教育合肥招聘合肥旅游文化藝術(shù)合肥美食合肥地圖合肥社保合肥醫(yī)院企業(yè)服務(wù)合肥法律

代做COMP9021、python程序設(shè)計代寫
代做COMP9021、python程序設(shè)計代寫

時間:2024-11-18  來源:合肥網(wǎng)hfw.cc  作者:hfw.cc 我要糾錯



1 General matters
1.1 Aim
Assignment 2 COMP**21, Trimester 3, 2024
The purpose of the assignment is to:
• develop your problem solving skills;
• design and implement the solutions to problems in the form of medium sized Python programs; • practice the design and implementation of search techniques, with recursion as a good approach; • design and implement an interface based on the desired behaviour of an application program;
• possibly practice using the re and numpy modules.
1.2 Submission
Your program will be stored in a file named crossword.py. After you have developed and tested your program, upload it using Ed (unless you worked directly in Ed). Assignments can be submitted more than once; the last version is marked. Your assignment is due by November 18, 10:00am.
1.3 Assessment
The assignment is worth 13 marks. It is going to be tested against a number of inputs. For each test, the automarking script will let your program run for 30 seconds.
Assignments can be submitted up to 5 days after the deadline. The maximum mark obtainable reduces by 5% per full late day, for up to 5 days. Thus if students A and B hand in assignments worth 12 and 11, both two days late (that is, more than 24 hours late and no more than 48 hours late), then the maximum mark obtainable is 11.7, so A gets min(11.7, 12) = 11.7 and B gets min(11.7, 11) = 11.
The outputs of your programs should be exactly as indicated. 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 routinely 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.
1

2 Solving crosswords 2.1 General description
The aim is to fill in a crossword grid, in which some letters might have been placed already, in one of two ways:
• being given the collection of all missing entries in an underlying solution to the crossword, find a way to place those entries in the grid (in one of possibly more than one way);
• being given a collection of words, find a way to select and place some of those words in the grid so that it solves the puzzle (in one of possibly more than one way).
We will consider grids with at least 2 rows and at least 2 columns, and such that any cell is next to another cell, though maybe not next to both horizontal and vertical cells; so any cell is part of a word of at least 2 letters, and by word we mean a word with at least 2 letters.
A presentation of a grid provided as input will be captured in a .tex file, and a presentation of a solved puzzle will also be captured in a .tex file; those .tex files can be given as arguments to pdflatex to generate .pdf files that display grids in a pleasing graphical form, but play no role in the assignment.
The code will be all about the design and implementation of a Crossword class. An object of class Crossword will provide an interface to work with a particular grid and collections of words of the kind just described; it will have methods for both problems previously described, and also benefit from the implementation of the __str__() special method to display some information about the grid and the words it possibly contains already.
partial_grid_3.tex is an example of a .tex file for a grid in which letters have been placed already, that can be considered as an input file, and here is the .pdf file created by pdflatex from this .tex file. solved_partial_grid_3.tex is an example of a .tex file for a solution to that grid, that can be
considered as an output file, and here is the .pdf file created by pdflatex from this .tex file. The contents of all input .tex files will be of the following form:
\documentclass{standalone}
\usepackage{pas-crosswords}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
...
\end{tikzpicture}
\end{document}
For input files, what lies between \begin{tikzpicture} and \end{tikzpicture} is of the following form:
\begin{crossgrid}[h=_, v=_]
\blackcases{_/_, ..., _/_}
\words[v]{_/_/_, ..., _/_/_}
\words[h]{_/_/_, ..., _/_/_}
\end{crossgrid}
Each of
• \blackcases{_/_, ..., _/_},
• \words[v]{_/_/_, ..., _/_/_} and • \words[h]{_/_/_, ..., _/_/_}
2

is optional and can appear in any order.
• In \begin{crossgrid}[h=_, v=_], the first and second occurrences of _ denote integers at least equal to 2, that represent the horizontal dimension and the vertical dimension of the grid, respec- tively; let h-dim and v-dim denote those dimensions, respectively.
• In \blackcases{_/_, ..., _/_}, each occurrence of _/_ denotes a slash-separated pair of integers (i,j) with 1 ≤ i ≤ h-dim and 1 ≤ j ≤ v-dim, to denote that there is a black square at the intersection of the ith column and the jth row. If \blackcases{_/_, ..., _/_} is present then there is at least one such pair, consecutive pairs being separated by a comma.
• In \words[v]{_/_/_, ..., _/_/_}, each occurrence of _/_/_ denotes a slash-separated triple (i,j,w) where i and j are integers with 1 ≤ i ≤ h-dim and 1 ≤ j ≤ v-dim, and where w is a word of at least 2 letters that is vertically placed in the grid and whose first letter is at the intersec- tion of the ith column and the jth row. If \words[v]{_/_/_, ..., _/_/_} is present then there is at least one such triple, consecutive triples being separated by a comma.
• In \words[h]{_/_/_, ..., _/_/_}, each occurrence of _/_/_ denotes a slash-separated triple (i,j,w) where i and j are integers with 1 ≤ i ≤ h-dim and 1 ≤ j ≤ v-dim, and where w is a word of at least 2 letters that is horizontally placed in the grid and whose first letter is at the intersection of the ith column and the jth row. If \words[h]{_/_/_, ..., _/_/_} is present then there is at least one such triple, consecutive triples being separated by a comma.
You can assume that the input is valid: no word or black square will start or extend beyond the dimensions of the grid.
For output files, what lies between \begin{tikzpicture} and \end{tikzpicture} is of the form \gridcross{_, ... _} where _, ... _ is a comma-separated sequence of v-dim strings, each of length h-dim, to denote from top to bottom each of the rows of the filled grid, using *s to represent black squares, and using uppercase letters for the grid’s entries.
In .tex files, there can be spaces between tokens almost everywhere (the pas-crosswords package actually prevents spaces to be used around some of the / characters). Also, in .tex files, the leftmost occurrence of a % marks the beginning of a comment that runs from this symbol included all the way to the end of the physical line, including the \n character. This allows one to have many physical lines to represent a unique logical line, and can be used to, for instance, have \blackcases{_/_, ..., _/_}, \words[v]{_/_/_, ..., _/_/_}, \words[h]{_/_/_, ..., _/_/_} and \gridcross{_, ... _} split over more than one physical line and improve readability. It is therefore advisable to process a .tex file in such a way that its content is captured as a single string with all space removed, before searching for patterns of interest in this string.
2.2 Analysing a grid (3 marks)
Your program will allow Crossword objects to be created from .tex files that you can assume are stored in the working directory, and whose contents satisfy all conditions spelled out in Section 2.1. Making use of the .tex files empty_grid_1.tex, empty_grid_2.tex, empty_grid_3.tex, partial_grid_1.tex, partial_grid_2.tex and partial_grid_3.tex, having for associated .pdf files empty_grid_1.pdf, empty_grid_2.pdf, empty_grid_3.pdf, partial_grid_1.pdf, partial_grid_2.pdf and partial_grid_3.pdf, here is a possible interaction.
Passing as argument to print() a denotation of a Crossword object results in an output of the kind A grid of width _ and height _, with _ black case[s], filled with _ letter[s],
with _ complete vertical word[s] and _ complete horizontal word[s]. where
• the first occurrence of _ is a number that represents the horizontal dimension of the grid, 3

• the second occurrence of _ is a number that represents the vertical dimension of the grid,
• the third occurrence of _ is no, 1 or a number at least equal to 2 that represents the number n of
black cases in the grid (of course it is case if n = 1 and cases otherwise),
• the fourth occurrence of _ is no, 1 or a number at least equal to 2 that represents the number n of
letters alredy placed in the grid (of course it is letter if n = 1 and letters otherwise),
• the fifth occurrence of _ is no, 1 or a number at least equal to 2 that represents the number n of
vertical words in the grid (of course it is word if n = 1 and words otherwise), and
• the sixth occurrence of _ is no, 1 or a number at least equal to 2 that represents the number n of
horizontal words in the grid (of course it is word if n = 1 and words otherwise).
2.3 Filling in a grid with given words (5 marks)
Crossword objects can call the fill_with_given_words() method, that takes two arguments.
• First, the name of a .txt file, meant to exist in the working directory and store a number of words, one word per line (without empty line, without space on any line). You can assume that the file indeed exists and has the expected contents. The file could be empty, and there could be more than one occurrence of a given word.
• Second, the name of a .tex file, meant to store a representation of a solution in case a solution exists.
The aim is to complete all missing entries precisely with the words stored in the file provided as first argument; so there should be as many words in the file as there are incomplete words in the grid; words do not have to be distinct in the file, because a given word can appear more than once in a grid.
If the task is impossible, then the method prints out:
Hey, it can't be filled with these words!
Otherwise, the method prints out:
I filled it!
Result captured in _.
where _ is the name of the .tex file that has been provided as argument to the method. The solution that has been discovered is stored in that file. If the file does not exist then it is created, in the working directory; if it does exist then it is overwritten. There could be more than one solution; only one solution is sought after, and any correct solution is acceptable. In any case, the method returns None.
Here is a possible interaction.
• The .tex files that have been created or overwritten during this interaction are
– filled_empty_grid_2.tex,
– filled_empty_grid_3.tex and – filled_partial_grid_2.tex.
• The associated .pdf files are
– filled_empty_grid_2.pdf,
– filled_empty_grid_3.pdf and – filled_partial_grid_2.pdf.
It is advisable to make sure that the spaces in the .tex files produced during the interaction are exactly as shown. Still, whitespace will be ignored for assessment purposes, but of course, all other nonspace characters have to be exactly the same, character for character.
4

2.4 Solving a crossword (5 marks)
Crossword objects can call the solve() method, that takes as argument the name of a .tex file, meant to store a representation of a solution in case a solution exists.
The aim is to complete all missing entries with words from the file dictionary.txt. That file is provided, meant to be stored in the working directory, and you can assume that this is the case indeed. A word in dictionary.txt could be used more than once, because a given word can appear more than once in a grid. The grid could already contain complete words that are not in dictionary.txt. This is fine. It should not be checked that any complete word in the input grid is in dictionary.txt; this might not be the case, and that is fine. But any incomplete or missing word has to be one from dictionary.txt.
If the task is impossible, then the method prints out:
Hey, it can't be solved!
Otherwise, the method prints out:
I solved it!
Result captured in _.
where _ is the name of the .tex file that has been provided as argument to the method. The solution that has been discovered is stored in that file. If the file does not exist then it is created, in the working directory; if it does exist then it is overwritten. There could be more than one solution; only one solution is sought after, and any correct solution is acceptable. In any case, the method returns None.
Here is a possible interaction.
• The .tex files that have been created or overwritten during this interaction are
– solved_empty_grid_1.tex,
– solved_empty_grid_2.tex,
– solved_partial_grid_1.tex and – solved_partial_grid_3.tex.
• The associated .pdf files are
– solved_empty_grid_1.pdf,
– solved_empty_grid_2.pdf,
– solved_partial_grid_1.pdf and – solved_partial_grid_3.pdf.
It is advisable to make sure that the spaces in the .tex files produced during the interaction are exactly as shown. Still, whitespace will be ignored for assessment purposes, but of course, all other nonspace characters have to be exactly the same, character for character.


請加QQ:99515681  郵箱:99515681@qq.com   WX:codinghelp




 

掃一掃在手機打開當前頁
  • 上一篇:代做CS202、代寫python/Java語言程序
  • 下一篇:CCIT4020代做、代寫c/c++,Java程序設(shè)計
  • 無相關(guān)信息
    合肥生活資訊

    合肥圖文信息
    流體仿真外包多少錢_專業(yè)CFD分析代做_友商科技CAE仿真
    流體仿真外包多少錢_專業(yè)CFD分析代做_友商科
    CAE仿真分析代做公司 CFD流體仿真服務(wù) 管路流場仿真外包
    CAE仿真分析代做公司 CFD流體仿真服務(wù) 管路
    流體CFD仿真分析_代做咨詢服務(wù)_Fluent 仿真技術(shù)服務(wù)
    流體CFD仿真分析_代做咨詢服務(wù)_Fluent 仿真
    結(jié)構(gòu)仿真分析服務(wù)_CAE代做咨詢外包_剛強度疲勞振動
    結(jié)構(gòu)仿真分析服務(wù)_CAE代做咨詢外包_剛強度疲
    流體cfd仿真分析服務(wù) 7類仿真分析代做服務(wù)40個行業(yè)
    流體cfd仿真分析服務(wù) 7類仿真分析代做服務(wù)4
    超全面的拼多多電商運營技巧,多多開團助手,多多出評軟件徽y1698861
    超全面的拼多多電商運營技巧,多多開團助手
    CAE有限元仿真分析團隊,2026仿真代做咨詢服務(wù)平臺
    CAE有限元仿真分析團隊,2026仿真代做咨詢服
    釘釘簽到打卡位置修改神器,2026怎么修改定位在范圍內(nèi)
    釘釘簽到打卡位置修改神器,2026怎么修改定
  • 短信驗證碼 寵物飼養(yǎng) 十大衛(wèi)浴品牌排行 suno 豆包網(wǎng)頁版入口 目錄網(wǎng) 排行網(wǎng)

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

    Copyright © 2025 hfw.cc Inc. All Rights Reserved. 合肥網(wǎng) 版權(quán)所有
    ICP備06013414號-3 公安備 42010502001045

    国产人妻人伦精品_欧美一区二区三区图_亚洲欧洲久久_日韩美女av在线免费观看
    成人动漫在线观看视频| 九九热这里只有精品免费看| 激情五月六月婷婷| 欧美日韩精品免费观看| 日韩精品资源| 精品人妻少妇一区二区| 欧美日韩天天操| 欧美日韩一区二区三| 国内精品一区二区| 国产专区在线视频| 国产亚洲欧美在线视频| 国产免费久久av| 国产午夜福利在线播放| 国产日韩欧美在线观看| 成人毛片网站| 久久久久久av无码免费网站下载| 九九九九九九精品| 国产精品老女人视频| 精品国产一区二区三| 一卡二卡三卡视频| 日本欧美在线视频| 欧美日韩午夜爽爽| 国产奶头好大揉着好爽视频| 97精品国产97久久久久久| 久久视频免费在线| 久久久精品免费视频| 欧美成人一区在线| 亚洲午夜精品国产| 日韩一二区视频| 国产日韩欧美黄色| 8090成年在线看片午夜| 色噜噜狠狠狠综合曰曰曰 | 久久久久久久久久亚洲| 国产精品欧美日韩一区二区| 在线观看欧美一区| 日本精品www| 国产欧美日韩专区发布| 国产成人亚洲综合91精品| 久久精品视频99| 亚洲一区三区电影在线观看| 日韩免费中文专区| 国产女女做受ⅹxx高潮| 日韩在线欧美在线| 亚洲一区二区三区四区在线播放| 欧美老熟妇喷水| 久久综合婷婷综合| 欧美日本黄视频| 欧美午夜精品久久久久久蜜| 97久久精品人搡人人玩| 国产精品久久久久久久美男| 日韩av成人在线观看| 国产一区二区三区小说| 久久久久五月天| 亚洲va码欧洲m码| 精品一区二区三区免费毛片| 久久精品日产第一区二区三区乱码| 精品免费久久久久久久| 日韩av日韩在线观看| 国产精品小说在线| 国产精品久久久久久久久影视| 日韩av日韩在线观看| www国产黄色| 美日韩精品免费视频| 欧美a在线视频| 久久99精品久久久水蜜桃| 亚洲欧洲国产日韩精品| 国产精品永久免费| 久久亚洲一区二区三区四区五区高 | 国产成人久久婷婷精品流白浆| 亚洲欧美日产图| 国产裸体免费无遮挡| 国产精品久久7| 欧美婷婷久久| 久草热久草热线频97精品| 亚洲v国产v在线观看| 99视频免费播放| 欧美激情极品视频| 蜜桃av久久久亚洲精品| 久久久精品影院| 欧美中文字幕视频| 久久久久久久久久av| 日韩资源av在线| 久久男人资源站| 亚洲一区二区三区精品动漫| 粉嫩av四季av绯色av第一区| 欧美激情乱人伦一区| 国产免费一区二区三区视频 | 久久久精品国产网站| 欧美专区第一页| 国产精品视频内| 免费观看亚洲视频| 两个人的视频www国产精品| 国产一级片91| 中文字幕一区二区三区乱码 | 久久精品99久久久久久久久| 精品免费一区二区三区蜜桃| 国产精品久久久久77777| 黄页免费在线观看视频| 国产精品美女呻吟| 国产在线精品一区二区中文| 欧美精品在线极品| av在线不卡一区| 日本一区高清不卡| 菠萝蜜影院一区二区免费| 欧美国产综合在线| 国产精品成人一区| 国产美女主播在线播放| 亚洲精品一区二区三区av| 久久婷婷人人澡人人喊人人爽| 日韩中文字幕在线免费| 色婷婷成人综合| 国产日韩亚洲欧美在线| 亚洲a∨一区二区三区| 久久久久久久久久久久久国产精品| 欧美激情一区二区三区在线视频| 久久五月天色综合| 97国产精品免费视频| 青青草视频在线视频| 欧美成年人视频网站欧美| 99国产在线| 欧美日韩国产精品一区二区| 欧美激情在线视频二区| 久久亚洲午夜电影| 免费看国产精品一二区视频| www.亚洲一区二区| 青青在线视频免费| 欧美日韩国产123| 久久国产精品一区二区三区四区| 国内精品久久国产| 亚洲 中文字幕 日韩 无码| 国产精品爽黄69| 久久综合伊人77777麻豆| 国内精品久久久久久久久| 亚洲日本欧美在线| 国产精品入口尤物| 久久网站免费视频| 国产资源第一页| 日韩福利视频| 中文字幕无码精品亚洲35| 深夜精品寂寞黄网站在线观看| 国产精品一区二区三区免费视频| 人人妻人人澡人人爽精品欧美一区| 欧美激情网友自拍| 国产精品入口福利| 久久精品aaaaaa毛片| 成人乱人伦精品视频在线观看| 欧美性在线观看| 天天夜碰日日摸日日澡性色av| 精品国产一区二区三区日日嗨| 精品国产一区二区在线| 久久婷婷开心| av动漫在线免费观看| 国内精品久久影院| 日韩美女免费观看| 亚洲精品无人区| 久久99久久99精品中文字幕| 久久久精品在线| 日韩中文字幕免费看| 国产成人短视频| 91国产在线播放| www国产无套内射com| 国产伦精品一区二区三区照片91| 欧美黄色免费影院| 日韩欧美手机在线| 日韩av综合在线观看| 一本色道久久综合亚洲精品婷婷| 国产精品九九九| 久久久99久久精品女同性| 久久av二区| 久久久亚洲欧洲日产国码aⅴ| 国产精品一区二区三区成人| 国产欧美日韩伦理| 国产一区二区三区小说| 免费h精品视频在线播放| 欧美亚洲精品一区二区| 欧美一区二区三区成人久久片| 亚洲在线免费看| 亚洲一区二区三区香蕉 | 国产美女在线一区| 国产欧美精品va在线观看| 国产在线精品一区| 精品无人乱码一区二区三区的优势| 青青在线视频一区二区三区| 人妻有码中文字幕| 欧美视频观看一区| 狠狠色噜噜狠狠色综合久 | 欧洲精品在线播放| 欧美视频在线观看网站| 精品欧美一区二区三区久久久| 国内精品模特av私拍在线观看| 国产自产在线视频| 成人免费淫片aa视频免费| 99在线国产| 国产高清av在线播放| 久久国产亚洲精品无码| 久久久久无码国产精品一区| 久久久久久久久久国产精品| 国产精品丝袜久久久久久高清 | 久久久久久久久国产| 日韩视频免费在线观看|