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
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 | Reset |
|---|---|---|---|---|
| basic_math_calculator-0.1.0-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
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
|