allows you to solve the Pythagorean theorem in Python
Project description
pythagore
A simple Python utility to work with the Pythagorean theorem.
✨ Features
- Calculate the hypotenuse from two sides
- Calculate a missing side using the hypotenuse
- Verify if a triangle is right-angled
- Retrieve library metadata (version, creator)
🔧 Installation
Install via pip:
pip install pythagore
🚀 Utilisation
This library is now a simple module (no class required).
Here is an example of using the module :
from pythagore import hypotenuse, adjacent_side, is_rectangle
a = 3
b = 4
h = hypotenuse(a, b)
print("Hypotenuse : ", h)
print("Is right triangle : ", is_rectangle(h, a, b))
missing = adjacent_side(h, a)
print("Missing side : ", missing)
example output
Hypotenuse: 5.0
Is right triangle: True
Missing side: 4.0
📦 Metadata
You can also access library information:
from pythagore import current_version, creator
print(current_version())
print(creator())
example output
1.5.0
Creator : Tina
GitHub : https://github.com/Tina-1300
❗ Prerequisites
- Python >= 3.13.0
- This library uses only the standard library (math)
- No external dependencies required
📄 Licence
This project is distributed under the MIT License. See the LICENSE file for more information. 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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pythagore-1.5.0.tar.gz.
File metadata
- Download URL: pythagore-1.5.0.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7f564b3fcab78d23658904f78368acc4ddb50321ddf1b4fabe68724bb76459a8
|
|
| MD5 |
b45df3c80e87466fb81d01897bd4d5aa
|
|
| BLAKE2b-256 |
18ab88eb7e538f220c426366221ed6df525098ed04f3433e74f515f1894360c4
|
File details
Details for the file pythagore-1.5.0-py3-none-any.whl.
File metadata
- Download URL: pythagore-1.5.0-py3-none-any.whl
- Upload date:
- Size: 3.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
34bacd55f674f924bc963149f9edbae63b9fa15b8e18c53f1091c6639607f34d
|
|
| MD5 |
f9fad021b6b45300c9199ba93112bc48
|
|
| BLAKE2b-256 |
3868860cddfcae6da1016c05f511dd674a6cdb812b4aac0ff57b845ba1e4adaf
|