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

Uploaded Source

Built Distribution

math_for_cannibals-1.14-py3-none-any.whl (3.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for math_for_cannibals-1.14.tar.gz
Algorithm Hash digest
SHA256 b8bb794ae4f063cdb265958088b11b3d5f4ebe6910bbd438591dc3e8b9210187
MD5 a4054041b138c057f58fb33f25934597
BLAKE2b-256 a5f600c6583bf7d8b65c00e3aa148d8ad161f9f53f760b2c4dddb49d8f134768

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for math_for_cannibals-1.14-py3-none-any.whl
Algorithm Hash digest
SHA256 2f17a5e459272f20a84d6081e5e5261b58ce9f7486b240c9dca6070f1a861838
MD5 63cccfb1b273c67ee3a3652cd07723fd
BLAKE2b-256 0211db61a8be5256ef8659020d369b2101b74bcc70b042e340ca2a3a9217837f

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