This is module to calculate shapes area.
Project description
Shapes square library
What is this?
The module allows you to work with shapes, calculate perimetr and area.
Using
Using the library is as simple and convenient as possible:
Let's import it first:
First, import everything from the library (use the from
... import *
construct).
Examples of all operations:
Create circle shape, using radius
:
circle = Circle(radius=radius)
Create triangle shape, using side_1
, side_2
, side_3
:
triangle = Triangle(a=side_1, b=side_2, c=side_3)
You can calculate perimetr for each shape, using get_perimetr()
:
shape_perimetr = shape.get_perimetr()
You can calculate are for each shape, using get_area()
:
shape_area = shape.get_area()
Also, you can use calculate_area()
which takes as input a parameter of type Shape (an abstract class for all shapes)
shape_area = calculate_area(shape=some_shape)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
square_shapez-0.0.1.tar.gz
(2.2 kB
view hashes)
Built Distribution
Close
Hashes for square_shapez-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c5857548477b65330380fa4f596ad0b058befcd8525d955e4be418531040e0c5 |
|
MD5 | 9e3ee2af0afe429ef9bbedfa8face622 |
|
BLAKE2b-256 | 5f64527d5f5c888894e8dcdb14a3127747666bdf392fc5dd29d257f675e439a3 |