Skip to main content

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

AreaCalculationSergey-1.1.tar.gz (1.9 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page