See the folder: Projects
Previously, our representation of a triangle is by three numbers (length of its sides). This is a valid representation because of the SSS congruence classification of triangle, i.e. every triangle of the same length of sides has the same geometric properties (including area, perimeter). The only possible differences are : positions of the triangles, orientations (whether it is a mirror image)
However, we cannot do so for a polygon with more than three sides. For example, a square is not always the same as a rhombus as they can have different interior angle.
It turns out we can represent a convex polygon by a sequence of points (coordinates of its vertices).
For example, a triangle with vertices $A(0,0)$, $B(2,2)$ and $C(0,10)$ has area $\frac{2\times 10}{2}$.
In sage, you can write mathematical expressions by starting with the descriptor: %md
Type your answer using Markdown and LaTeX, and also with the help of Sage.
For the usage or list of mathematical symbols, you can refer to HostMath or detexify (http://detexify.kirelabs.org/classify.html).
def duplicate(n):
return ZZ(str(n)*2)