Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pymathtools-1.1.tar.gz (3.3 kB view hashes)

Uploaded Source

Built Distribution

pymathtools-1.1-py3-none-any.whl (3.4 kB view hashes)

Uploaded Python 3

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