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

合肥生活安徽新聞合肥交通合肥房產生活服務合肥教育合肥招聘合肥旅游文化藝術合肥美食合肥地圖合肥社保合肥醫院企業服務合肥法律

COMP9021代做、代寫Python編程語言
COMP9021代做、代寫Python編程語言

時間:2025-04-28  來源:合肥網hfw.cc  作者:hfw.cc 我要糾錯



Assignment 2 version 1.2
COMP9021, Trimester 1, 2025
1 General matters
1.1 Aim
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;
• design and implement an interface based on the desired behaviour of an application program;
• organise code into classes and implement special methods;
• possibly practice using the re and numpy modules;
• optionally practice the design and implementation of search techniques, with recursion as a good
approach.
1.2 Submission
Your program will be stored in a file named tangram.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 April 28, 11:59am.
1.3 Assessment
The assignment is worth 13 marks, plus 5 bonus 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.
Important notice:
• The bonus mark is an option only for programs submitted by the deadline, NOT for
programs submitted within 5 days after the deadline.
• The final mark for the course is capped to 100; the bonus mark cannot let you score more than 100
in the course.
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 Tangram puzzles and the TangramTikz package
See Tangram for an overview on Tangram puzzles. All shapes under consideration consist of a unique
connected component without inside hole.
We play with 2 large triangles, a medium triangle, 2 small triangles, a square and a parallelogram of
the following sizes in centimetres, first positioned as shown, the red dot playing the role of an “anchor”.
2
2
2
1
1
1
1
1
1
1
Each piece can be flipped about the vertical line that goes through the anchor, flipped about the
horizontal line that goes through the anchor, and rotated about its anchor (as if it was a pivot) by a
multiple of 45 degrees, before being moved to let the anchor be positioned at given x- and y-coordinates.
We work with .tex files, any of which can be given as argument to pdflatex to generate a .pdf file.
• Here is a .tex file for the solved Tangram of a kangaroo, and here is the associated pdf file.
• Here is a .tex file for the solved Tangram of a cat, and here is the associated pdf file.
• Here is a .tex file for the solved Tangram of a goose, and here is the associated pdf file.
More precisely, the .tex files we work with have the following structure:
\documentclass{standalone}
\usepackage{TangramTikz}
\begin{document}
\begin{EnvTangramTikz}
...
\end{EnvTangramTikz}
\end{document}
Between \begin{EnvTangramTikz} and \end{EnvTangramTikz} are 7 lines, one for each piece, that read
as:
\PieceTangram[TangSol](...,...){...}
or as
\PieceTangram[TangSol]<...>(...,...){...}
... between the curly braces at the end is one of
2
• TangGrandTri for any of the two large triangles,
• TangMoyTri for the medium triangle,
• TangPetTri for any of the two small triangles,
• TangCar for the square, and
• TangPara for the parallelogram.
Both ... within the pair of parentheses are for the x- and y-coordinates of the point where the anchor
of the piece has to be moved, after the piece has been possibly flipped and rotated. These coordinates
are of the form a, a+sqrt(2), a-sqrt(2), a+b*sqrt(2), a-b*sqrt(2), sqrt(2), +sqrt(2), -sqrt(2)
or a*sqrt(2) where a and b are integers or floating point numbers with b being 0 or strictly positive.
Floating point numbers have a dot in their representation. When positive, a can start with + whereas
b can’t. Floating point numbers can start with any number of 0s, and 0 before the dot is optional in
floating point numbers whose absolute value is smaller than 1 (essentially, any sequence of digits and one
dot that Python accepts as a floating point literal is valid).
... between the less than and greater than signs is for one, two or three distinct options, consecutive
options being separated by a comma. The possible options are:
• xscale=-1, to flip the piece so left becomes right and right becomes left,
• yscale=-1, to flip the piece so top becomes bottom and bottom becomes top, and
• rotate=_ with _ an integer that is a multiple of 45 (positive values are for anticlockwise rotation,
negative values are for clockwise rotation).
The options can appear in any order; their sequence determines the order in which the associated trans formations are applied to the piece. It is always possible to have either no option, or a rotation, or an
x-flip (that is, a flip about the vertical line that goes through the anchor), or a rotation followed by an
x-flip.
In the whole .tex file, there can be blank lines and whitespace (space and tab characters) between
tokens everywhere. Also, 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.
3
3 The tasks to perform
Your program will allow TangramPuzzle 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.
3.1 Reporting on the transformations applied to each piece (3 marks)
A TangramPuzzle object has a transformations attribute, whole value is a dictionary with 7 keys,
one for each piece. The keys are 'Large triangle 1', 'Large triangle 2', 'Medium triangle',
'Small triangle 1', 'Small triangle 2', 'Square' and 'Parallelogram'. The order of the large
and small triangles are given by the order they have in the .tex file. More generally, the keys of the
dictionary are created in the order of the corresponding pieces in the .tex file. The value for each key is
itself a dictionary whose keys are 'rotate' and 'xflip' . The value for 'rotate' is an integer between
0 included and 360 excluded. The value for 'xflip' is either True or False. So the transformation
applied to each piece is normalised, consisting of first a rotation (maybe equal to 0) possibly followed by
an x-flip.
Here is a possible interaction.
3.2 Reporting on the coordinates of the vertices (4 marks)
Printing out a TangramPuzzle object outputs for each piece, the coordinates of the vertices.
• Pieces are listed from the ones whose leftmost topmost vertices are highest to the ones whose leftmost
topmost vertices are lowest. When the heights of the leftmost topmost vertices of two pieces are
the same, the piece that is to the left of the other piece is listed first. Essentially, the plane is
scanned from top to bottom and from left to right and when the leftmost topmost vertex of a piece
is encountered, the piece is listed.
• Coordinates have the simplest possible form, as shown in the provided examples here. Binary +
and - have a space on both sides, there is no addition of 0, there is no multiplication by 0, there
is no multiplication by 1 or -1, fractions are simplified, integers are used instead of fractions whose
denominator would be 1, and fractions are surrounded by parentheses when followed by √2 to avoid
that it be wrongly believed that √
2 is multiplied by the denominator.
• For a given piece, the enumeration of vertices proceeds clockwise starting from the leftmost topmost
vertex.
3.3 Creating a file to represent the pieces of the solved puzzle (3 marks)
The TangramPuzzle class has a draw_pieces() method that takes the name of a .tex file as argument,
to represent a solved tangram using the tikz package rather than the TangramTiks package, easily taking
advantage of what has been done for the previous part. The order of the pieces, the order of the vertices
of a given piece, are the same as for the previous part. The origin of the plane is represented by a red dot.
The grid in the background extends in such a way that there is at least one square (of 5mm by 5mm)
and strictly less than 2 squares above the topmost vertex, to the right of the rightmost vertex, below
the bottommost vertex and to the left of the leftmost vertex. For example: if the x-coordinate of the
rightmost vertex of the shape is equal to 3.01 or 3.5, then the grid extends to the right to an x-coordinate
of 4; if the x-coordinate of the rightmost vertex of the shape is equal to 3.51 or 4, then the grid extends
to the right to an x-coordinate of 4.5.
Executing
$ python3
...
>>> from tangram import *
4
>>> TangramPuzzle('kangaroo.tex').draw_pieces('kangaroo_pieces_on_grid.tex')
>>> TangramPuzzle('cat.tex').draw_pieces('cat_pieces_on_grid.tex')
>>> TangramPuzzle('goose.tex').draw_pieces('goose_pieces_on_grid.tex')
produces this, this and this .tex files, respectively, with this, this and this associated .pdf files.
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, with all lines in the same order.
3.4 Creating a file to represent the outline of the solved puzzle (3 marks)
The TangramPuzzle class has a draw_outline() method that takes the name of a .tex file as argument,
to represent a solved tangram by drawing the outline of its shape as opposed to each piece, starting
from the leftmost topmost vertex and moving in a clockwise direction. Straight line segments extend as
much as possible between vertices. Again, the origin is represented by a red dot. Again, the grid in the
background extends in such a way that there is at least one square (of 5mm by 5mm) and strictly less
than 2 squares above the topmost vertex, to the right of the rightmost vertex, below the bottommost
vertex and to the left of the leftmost vertex.
Executing
$ python3
...
>>> from tangram import *
>>> TangramPuzzle('kangaroo.tex').draw_outline('kangaroo_outline_on_grid.tex')
>>> TangramPuzzle('cat.tex').draw_outline('cat_ouline_on_grid.tex')
>>> TangramPuzzle('goose.tex').draw_outline('goose_outline_on_grid.tex')
produces this, this and this .tex files, respectively, with this, this and this associated .pdf files.
Again, 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, with all lines in the same order.
3.5 Solving a puzzle (5 bonus marks)
A function solve_tangram_puzzle() takes a file name as argument and returns a TangramPuzzle object,
making the following interaction successful:
$ python3
...
>>> from tangram import *
>>> solve_tangram_puzzle('kangaroo_outline_on_grid.tex').draw_pieces('solved_kangaroo.tex')
>>> solve_tangram_puzzle('cat_outline_on_grid.tex').draw_pieces('solved_cat.tex')
>>> solve_tangram_puzzle('goose_outline_on_grid.tex').draw_pieces('solved_goose.tex')
>>> ^D
$ diff kangaroo_pieces_on_grid.tex solved_kangaroo.tex
$ diff cat_pieces_on_grid.tex solved_cat.tex
$ diff goose_pieces_on_grid.tex solved_goose.tex


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







 

掃一掃在手機打開當前頁
  • 上一篇:代寫COMP10002、代做C++編程設計
  • 下一篇:代做ISYS1001、代寫C++,Java程序
  • 無相關信息
    合肥生活資訊

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

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

    Copyright © 2025 hfw.cc Inc. All Rights Reserved. 合肥網 版權所有
    ICP備06013414號-3 公安備 42010502001045

    国产人妻人伦精品_欧美一区二区三区图_亚洲欧洲久久_日韩美女av在线免费观看
    亚洲欧洲国产精品久久| 宅男一区二区三区| 国产精品免费入口| 日韩av日韩在线观看| 国产乱子夫妻xx黑人xyx真爽| 日韩中文av在线| 视频一区亚洲| 浮妇高潮喷白浆视频| 国产精品国产三级欧美二区| 青青草国产精品视频| 8090成年在线看片午夜| 欧美日本亚洲视频| 狠狠干一区二区| 色老头一区二区三区在线观看| 国产精品国产三级国产专区51| 日产精品久久久一区二区福利| 成 年 人 黄 色 大 片大 全 | 欧美激情视频给我| 国产亚洲精品自在久久| 国产精品久久色| 黄色动漫网站入口| 国产精品视频福利| 黄色网络在线观看| 国产精品久久久久久婷婷天堂| 欧美日韩一区二区三区在线观看免| 久久精品magnetxturnbtih| 亚洲黄色成人久久久| 91成人在线视频观看| 欧美激情伊人电影| 国产免费成人在线| 欧美激情一二区| 国产噜噜噜噜噜久久久久久久久| 精品国产一区二区三区四区精华 | 精品中文字幕在线观看| 国产在线拍偷自揄拍精品| 麻豆乱码国产一区二区三区| 国产视频观看一区| 中文字幕日韩精品一区二区| 成人在线观看a| 自拍另类欧美| 91久久综合亚洲鲁鲁五月天| 视频一区视频二区视频三区视频四区国产| 国产精品av电影| 日本三日本三级少妇三级66| 久久久精品一区二区| 国模吧一区二区三区| 欧美黄网免费在线观看| 91九色精品视频| 国模杨依粉嫩蝴蝶150p| 精品一区二区视频| 少妇大叫太大太粗太爽了a片小说| 国产精品视频一区二区三区四 | 国产精品国语对白| 国产精品12345| 欧美,日韩,国产在线| 亚洲精品高清国产一线久久| 国产精品久久久久久久电影 | 91久久中文字幕| 欧美午夜精品久久久久久蜜| 中文字幕色呦呦| 国产精品男人的天堂| 国产成人一区二区三区电影 | www.久久色.com| 91久久精品国产| 国产专区一区二区| 青青久久av北条麻妃黑人| 亚洲国产精品久久久久婷婷老年| 国产精品污www一区二区三区| 国产精品10p综合二区| 国产伦精品一区二区三区四区视频_| 秋霞毛片久久久久久久久| 最新欧美日韩亚洲| 国产精品久久久久9999爆乳| 九九九九久久久久| 777午夜精品福利在线观看| 国产女精品视频网站免费| 欧美极品日韩| 欧洲精品视频在线| 日韩av成人在线| 亚洲欧洲日韩精品| 欧美精品成人在线| 国产精品国模在线| 久久精品99久久久久久久久| 久久久久一区二区| 久久成人福利视频| 久久精品香蕉视频| 国产精品永久免费在线| 精品视频一区二区三区四区| 男女午夜激情视频| 激情五月宗合网| 精品欧美一区二区精品久久| 欧美国产综合在线| 国内偷自视频区视频综合| 加勒比成人在线| 国内视频一区| 国产在线青青草| 国产日产欧美a一级在线| 国产日韩av在线播放| 丰满人妻中伦妇伦精品app| www.国产二区| 91精品国产91久久久久久| www日韩在线观看| 91精品视频在线| 国产精品999999| 久久精品国产精品青草色艺| 日韩视频永久免费观看| 国产成人精品综合| 日日狠狠久久偷偷四色综合免费| 国产成人激情视频| 久久精品国产精品青草色艺| 久久久免费观看| 91好吊色国产欧美日韩在线| 国产乱淫av片杨贵妃| 国产欧美一区二区三区不卡高清| 狠狠干 狠狠操| 免费看日b视频| 激情视频综合网| 欧美日韩另类综合| 精品日产一区2区三区黄免费 | 一区二区三区一级片| 欧美激情综合色综合啪啪五月| 久久夜色精品亚洲噜噜国产mv| 国产精品久久久久久久9999| 国产精品久久久久影院日本| 久久好看免费视频| 国产在线拍揄自揄视频不卡99| 国产免费久久av| 超碰在线97av| 国产精品2018| 久久久久久一区二区三区| zzjj国产精品一区二区| 久久精品视频va| 国产精品久久久久久久久| 久久艹在线视频| 欧美激情精品久久久久| 亚洲综合中文字幕在线| 五月天色婷婷综合| 日韩欧美xxxx| 免费观看精品视频| 麻豆亚洲一区| www国产精品内射老熟女| 久久男人的天堂| 久久久av免费| 一女被多男玩喷潮视频| 欧美一区1区三区3区公司| 青青草成人免费在线视频| 黄色www在线观看| 国产免费一区二区视频| 91精品久久久久久久久久久 | 91精品久久香蕉国产线看观看| 久久久爽爽爽美女图片| 久久久久久久香蕉网| 国产精品精品视频一区二区三区| 国产精品成人观看视频免费| 亚洲视频在线观看日本a| 日本精品免费一区二区三区| 欧洲精品久久久| 99在线首页视频| 日韩视频中文字幕| 欧美精品久久久久久久久久| 日韩视频在线观看视频| 免费99视频| 国产亚洲精品网站| 日韩有码在线播放| 欧美久久久精品| 日本成人在线不卡| 国产美女直播视频一区| 久久精品久久精品国产大片| 久久伊人精品一区二区三区| 亚洲精品国产suv一区88| 欧美一级大片在线观看| 成人9ⅰ免费影视网站| 日韩在线观看免费| 亚洲最大福利视频| 欧美xxxx黑人又粗又长密月| 97国产精品视频| 国产精品美女999| 色噜噜色狠狠狠狠狠综合色一| 欧美午夜视频在线| 91精品免费看| 精品国产成人av在线免| 日本福利视频一区| 高清国产一区| 久久久久天天天天| 无码日韩人妻精品久久蜜桃| 国产资源在线视频| 日韩亚洲欧美中文在线| 亚洲成人av动漫| 国产伦精品一区二区三区四区视频_ | 久久香蕉频线观| 日本一区高清不卡| 91久久国产综合久久91精品网站| 国产精品久久精品视| 日本不卡高字幕在线2019| 国产免费一区| 国产精品日韩专区| 日韩中文字幕av在线| 久久另类ts人妖一区二区| 影音先锋欧美在线| 国产自偷自偷免费一区|