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

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-1.15.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: math_for_cannibals-1.15.tar.gz
  • Upload date:
  • Size: 4.3 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-1.15.tar.gz
Algorithm Hash digest
SHA256 21df27b7332944fed8da9869e6a414865e0ba89a563a252827146c6a1f8a4d7f
MD5 5fc71214a4695110b20a38820232e14a
BLAKE2b-256 62ebfb6d91420613fabeefb6aa58924b3b92b1aa3d41ddaaa8b2fd5469f55a8c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for math_for_cannibals-1.15-py3-none-any.whl
Algorithm Hash digest
SHA256 e41537aa767c7060e69e7aa408ef9a17681d0dc04db0c8f99bc364ebf3acb516
MD5 2ec26850fc9dd2673082bca184b438e2
BLAKE2b-256 474a9a52fdd2006ee86954983d1d4902126a1b81f9a81338407b0880687d5a5c

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