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
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:
Usage
Table of Contents
Configuring the Class
The class responsible for the calculations is configured like this:
from program.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
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
Built Distribution
File details
Details for the file math_for_cannibals-1.121.tar.gz
.
File metadata
- Download URL: math_for_cannibals-1.121.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0383ab6945ed530a590303d7c2f598debebe81f66e5e3a0e434dbf51bebcf247 |
|
MD5 | fba93444440c2a422253a193b7660b25 |
|
BLAKE2b-256 | 5ed98b3ddec725212dd5fd4da66b8e679349a5013a030f44c338719dce9850c4 |
File details
Details for the file math_for_cannibals-1.121-py3-none-any.whl
.
File metadata
- Download URL: math_for_cannibals-1.121-py3-none-any.whl
- Upload date:
- Size: 3.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 19b32c1d61fe5f6f1627f953c996ac412fe5a958306067592d811b21be3ae208 |
|
MD5 | 6175d7abf9e668d810315cbfd85fa0cc |
|
BLAKE2b-256 | debb9bc6304be6557c8503599f6cb273fcc54c25e4a89a386a09f2d2c77e9eab |