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
Hashes for pymathtools-1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fbed6bbfcd974f8d33b933212b3befe4540e912814c90b1ba81058b2871cfef1 |
|
MD5 | 19495648baf67a8b082bae86b365f34b |
|
BLAKE2b-256 | a124b4d682b225872a495e87faf7e9ee28b4e18484da9a52c4339befa763c3ba |