Area calculation of diferent figures.
Project description
AreaCalculationSergey 0.0
What is this?
The module allows you to calculate areas of different figures.
Quick Guide
from AreaCalculationSergey import area
instance = area.AreaCalc
instance.area_of_circle(radius)
There are three functions:
area_of_circle(radius, round_result=2) - allows you to calculate area of a circle, using only radius.
area_of_triangle(side1, side2, side3, round_result=2) - allows you to calculate area of a triangle, using three sides of triangle.
Also you can add additional argument to round the result, by default is 2.
right_triangle(side1, side2, side3) - allows you to know whether triangle is right or not.
How to add new metod
def area_rectangle(side1, side2, round_result=2):
return side1 * side2
instance = AreaCalc()
instance.area_rectangle = area_rectangle
instance.area_rectangle(5, 4)
Instaling
pip install AreaCalculationSergey
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Close
Hashes for AreaCalculationSergey-1.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | d2a8212bd39bc3ccb4c3d0b2c6445799ccea26b18d80a44a65604054cef239ca |
|
MD5 | 484344fc7266c855ae228945e9e1efdb |
|
BLAKE2b-256 | ac58393d85d63ad15ca08625578be0d4efcf72841800c366ba464a05a1d84a1d |