Skip to main content

Math functions to simplify mathematical tasks

Project description

Math for Cannibals

This Python package provides mathematical functions to automate calculations, particularly for right triangles.

Table of Contents

  1. Installation
  2. Practical Information
  3. Usage
  4. Contributing
  5. License

Installation

To install the package, run the following command:

pip install math_for_cannibals

Practical Information

When using the class, you will be prompted to provide values for a, b, and c. These values represent the sides and angles of a right triangle, defined as follows:
right_triangle If the image is not rendered, you can view it here.

Usage

Table of Contents

  1. Configuring the Class
  2. Using the Class
  3. Retrieving Calculated Values

Configuring the Class

The class responsible for the calculations is configured like this:

from math_for_cannibals.RightTriangle import RightTriangle

Rt = RightTriangle(aSide, bSide, cSide, aDegree, bDegree)

Here’s an example:

Rt = RightTriangle(aDegree=20)

Using the Class

You can use the class by entering the information you know about the triangle. The following are some example usages:

Rt = RightTriangle(aDegree=20)
Rt = RightTriangle(aSide=2, bSide=3)
Rt = RightTriangle(aDegree=20, aSide=2)

Retrieving Calculated Values

To get the calculated angles and sides of the triangle, you can use the following methods:

Rt = RightTriangle(aDegree=20)
Rt.get_degrees()

The class has three main methods:

  • get_degrees() - Returns only the angles of the triangle.
  • get_sides() - Returns only the sides of the triangle.
  • get_triangle() - Returns both the sides and angles of the triangle.

Contributing

Contributions are welcome! Please send an email explaining your proposed improvements to ensure clarity.
Be sure to update tests as needed.

License

MIT

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

math_for_cannibals-2.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

math_for_cannibals-2-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file math_for_cannibals-2.tar.gz.

File metadata

  • Download URL: math_for_cannibals-2.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.1

File hashes

Hashes for math_for_cannibals-2.tar.gz
Algorithm Hash digest
SHA256 65d96cc515956703320f2095b722daa9f7a91f71fc50fa9c7730b8259f8e7889
MD5 508e424583ed869b8f3d28e396116f5d
BLAKE2b-256 e5edb95a467ad1534167d35ff28e74d1cdf99d4cef39adaf2f2db0f85c7f1a25

See more details on using hashes here.

File details

Details for the file math_for_cannibals-2-py3-none-any.whl.

File metadata

File hashes

Hashes for math_for_cannibals-2-py3-none-any.whl
Algorithm Hash digest
SHA256 71aa95242e0c130e06e1cef18f0e999fc62a8ef9e0ab2a1d1a7fccb61ddf7acc
MD5 26e386ad8e46d2ff712e486dd59bcefe
BLAKE2b-256 ccb9c2982cad53fb6dfab3f4cf9751266592318ca2da70fdcc772038a2941312

See more details on using hashes here.

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