Skip to main content

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


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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

square_shapez-0.0.1-py3-none-any.whl (2.5 kB view details)

Uploaded Python 3

File details

Details for the file square_shapez-0.0.1.tar.gz.

File metadata

  • Download URL: square_shapez-0.0.1.tar.gz
  • Upload date:
  • Size: 2.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.7

File hashes

Hashes for square_shapez-0.0.1.tar.gz
Algorithm Hash digest
SHA256 86adf7d0c84937bc44d8ef82ed105d97fec9a488054e2a88a04484949488a14b
MD5 ed14585aa808dde3f59884cc10223fbc
BLAKE2b-256 c42b93ba75da6bfd36cfa2e9971011c525ce9d688eedfd026d9e6a6cb39c4e0e

See more details on using hashes here.

File details

Details for the file square_shapez-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: square_shapez-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 2.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.7

File hashes

Hashes for square_shapez-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c5857548477b65330380fa4f596ad0b058befcd8525d955e4be418531040e0c5
MD5 9e3ee2af0afe429ef9bbedfa8face622
BLAKE2b-256 5f64527d5f5c888894e8dcdb14a3127747666bdf392fc5dd29d257f675e439a3

See more details on using hashes here.

Supported by

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