Basic calculator
This is a calculator project for basic math functions.
Implemented methods:
addition
subtraction
multiplication
division
nth-root ((n) root of a number)
reset memory
Installation
pip install basic-math-calculator
from calculator.calculator import Calculator
Usage
Result is stored and overwritten in memory until reset() method is ran.
Calculation methods can take either one or two arguments (in addition to self). If only one arguments is given calculations will be performed with memory value (latest result), otherwise calculations will be performed between two arguments and memory value will be overwritten.
For example:
>>> calc = Calculator()
>>> calc.addition(4, 5)
9
>>> calc.addition(10)
19
>>> calc.multiplication(2)
38
>>> calc.multiplication(2, 5)
10
>>> calc.reset()
0
License
This project is licensed under the terms of the MIT license
Metadata
Release files for basic_math_calculator 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| basic_math_calculator-0.1.0-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for basic_math_calculator-0.1.0-py2.py3-none-any.whl |
Release files / basic_math_calculator-0.1.0-py2.py3-none-any.whl
| Download URL | basic_math_calculator-0.1.0-py2.py3-none-any.whl |
|---|---|
| Size | 3.7 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
a77b7a87f9bf5d73d4ac6c29e3a30d0ad4ab362ae778216c8b231392b26c2408
|
|
BLAKE2b-256 checksum How to use checksums |
268de7a9a1ae02ff952a274c83f8aaec335be7ada4235648b113e2880c9d21b7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.27.1
|
Security for basic_math_calculator 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.