Skip to content

Documentation for area.py

TheTechRobo edited this page May 23, 2021 · 11 revisions

This article will be rendered outdated by the rewrite. You can help Palc by editing it.

DISCLAIMER: The area calculator is not 100% accurate. We provide NO WARRANTY for any mistakes made due to this software. Further info is in the LICENSE file.

I suggest if you aren't developing a program using Mathmod, just boot up Palc and use the interactive mode. It's much better than what you're trying to do here.

Equilateral triangle

Syntax: area_equilateral_triangle(<side_of_triangle>), replacing <side_of_triangle> with the length of the side of the triangle.

Triangle with right angle

Syntax: area_right_triangle(<base_of_triangle>, <height_of_triangle>), replacing <base_of_triangle> and <height_of_triangle> with the appropriate measurements.

Acute triangle

Syntax: area_acute_triangle(<length_of_side>, <length_of_side_2>, <length_of_side_3>), replacing <length_of_side> and the others with the proper measurements.

Obtuse Triangle

Syntax: area_obtuse_triangle(<length_of_side>, <length_of_side_2>, <length_of_side_3>), replacing with the correct numbers.

Square

Syntax: area_square(<side>), replacing with the length of the side.

Rectangle

Syntax: area_rectangle(<base>, <height>), adding the proper numbers.

Parallelogram

Syntax: area_parallelogram(<base>, <height>), adding the measurements.

Rhombus

Syntax: area_rhombus(do, ds), replacing do with the first diagonal and ds with the second diagonal

Trapezium

Syntax: area_trapezium(a, b, h), replacing a and b with the parallel sides, and h as the height.

Full circle

Syntax: area_circle(r), replacing r with the radius of the circle

Semicircle

Syntax: area_semicircle(r), replacing r with the radius of the circle

Circular sector

Syntax: area_circular_sector(r, a), replacing r with the radius and a with the angle of the sector in degrees

Ring

Syntax: area_ring(ro, rs), replacing ro with the radius of the outer circle and rs with the radius of the inner circle

Ellipse

Syntax: area_ellipse(a, b), replacing a and b with the length of major and minor axis, respectively

Clone this wiki locally