basic_calcs 0.0.3
basic_calcs is a python library for basic calculations. It has no dependencies, just the standard library. It can run on almost any OS or python version.
Installation
Install using this command:
pip install basic_calcs
Build from source
To build from source, first fork this repository and clone it. Then, install the developer dependencies:
pip install build setuptools
It is recommended to run this in a virtual environment. Then, to install it, run pip install .
Usage
Usage is very simple. Currently, there are only a few functions. Their usage is as follows:
from basic_calcs import *
add([10, 5])
# 15. add all the numbers you want to add in the list
subtract([10, 5])
# 5. add all the numbers you want to subtract in the list
multiply([10, 5])
# 50. add all the numbers you want to multiply in the list
divide(10, 5)
# 2
floor(10, 4)
# usually this would be 2.5 but in floor its rounded to 3
power(10, 2)
# 100
root(9, 2)
# 3
area_triangle(10, 2)
# 10
area_quad(10, 2)
# 20
area_circle(5)
# if radius is 5 then area is 78.57
area_polygon(2, 4)
# 4
Every function also has a verbose parameter which provides a more verbose answer. it defaults to False. Use it as follows:
from basic_calcs import add
add(5, 5, True) # it works the same for the rest of the functions
# 5 + 5 = 10
Metadata
Release files for basic-calcs 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| basic_calcs-0.0.3.tar.gz | 3.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| basic_calcs-0.0.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.0 kB
Release files / basic_calcs-0.0.3.tar.gz
| Download URL | basic_calcs-0.0.3.tar.gz |
|---|---|
| Size | 3.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6a25923caef521a8c443834da4840f546e15b3bd8215d2888f2b88af73fcee0f
|
|
BLAKE2b-256 checksum How to use checksums |
86178373f8cd222184cbac2228e7b95098f3e5109a34feaa08a04e26c7d1cbd9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.3
|
Release files / basic_calcs-0.0.3-py3-none-any.whl
| Download URL | basic_calcs-0.0.3-py3-none-any.whl |
|---|---|
| Size | 4.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
160c12305de3a469de5f81bde3cf27045c34c0bd9d8240b1f90214e36a871528
|
|
BLAKE2b-256 checksum How to use checksums |
4a028e0d7d39380c6651f3fb72dc503fd18e3eb823f126e28e5a683e670a9e0c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.3
|