A really simple Python library to do some math operations
Project description
PyMathTools
A really simple Python library to do some math operations
PyPi page: https://pypi.org/project/pymathtools/
Installation
To install the library, run the following command:
pip install pymathtools
To import it in a script, add the following line:
from pymathtools import *
Commands
This package includes the following commands/functions:
isprime(primenum)
Checks if a number is prime. Takes in a integer and returns a bool True/False
prime = isprime(17) # Using 17 as an example
print(prime)
Response:
True
rectanglearea(area1, area2)
rectanglearea = rectanglearea(7, 4)
print(rectanglearea)
Response:
28
trianglearea(area1, area2)
trianglearea = trianglearea(6, 3)
print(trianglearea)
Response:
9.0
squarearea(area1)
squarearea = squarearea(7)
print(squarearea)
Response:
49
cubevolume(length, width, height)
cubevolume = cubevolume(3, 4, 7)
print(cubevolume)
Response:
49
triangleperimeter(side1, side2, side3)
triangle = triangleperimeter(3, 4, 10)
print(triangle)
Response:
17
squareperimeter(side1)
square = squareperimeter(410)
print(square)
Response:
1640
parallelogramperimeter(side1, side2)
parallelogram = parallelogramperimeter(10, 410)
print(parallelogram)
Response:
840
circlediameter(radius)
circlediam = circlediameter(14)
print(circle)
Response:
28
circlearea(radius)
circlearea = circlearea(17)
print(circlearea)
Response:
907.46
mathmean(sum, number)
mathmean = mathmean(sum, number)
Project details
Release history Release notifications | RSS feed
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 pymathtools-1.1.tar.gz
.
File metadata
- Download URL: pymathtools-1.1.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7010850020901aa7d6d430932e944bed2d992ec33186e409d1fa688bdcf9ec3e |
|
MD5 | 6cd0a7ed4d21c34c7ebe3823f1f569a9 |
|
BLAKE2b-256 | 754d59025ac023887c9d9f410e17f0931930305eed714b55f66b6e834f2e3697 |
File details
Details for the file pymathtools-1.1-py3-none-any.whl
.
File metadata
- Download URL: pymathtools-1.1-py3-none-any.whl
- Upload date:
- Size: 3.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fbed6bbfcd974f8d33b933212b3befe4540e912814c90b1ba81058b2871cfef1 |
|
MD5 | 19495648baf67a8b082bae86b365f34b |
|
BLAKE2b-256 | a124b4d682b225872a495e87faf7e9ee28b4e18484da9a52c4339befa763c3ba |