Simple calculator package
Project description
calculator_102
calculator_102 is a Python package that contains functions for simple calculation.
Installation
Use the package manager pip to install calculator_102.
pip install calculator_102
Usage
Calculator has its own memory, meaning it can manipulate its starting number 0 until it is reset.
Features:
>>> calculator = Calculator()
-
memory
shows current value in memory:
# Memory value = 50
>>> calculator.memory()
50
-
add
adds number to memory value:
# Memory value = 0
>>> calculator.add(2)
2
-
subtract
subtracts number from memory value:
# Memory value = 10
>>> calculator.subtract(4)
6
-
multiply
multiplies memory value by number:
# Memory value = 10
>>> calculator.multiply(2)
20
-
divide
divides memory value by number:
# Memory value = 10
>>> calculator.divide(2)
5.0
-
n_root
finds the root of memory value by the inputted number:
# Memory value = 100
>>> calculator.n_root(2)
10.0
-
reset
resets memory value to its initial value - 0:
# Memory value = 100
>>> calculator.reset()
# Memory value = 0
License
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
calculator_102-0.1.7.tar.gz
(2.5 kB
view hashes)
Built Distribution
Close
Hashes for calculator_102-0.1.7-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 465700bfba499dbe5e409d5835da8a2d743771c1c24ced77226b0c55bf39eb13 |
|
MD5 | 703f1fa7b2c78abe577f92132fffa9d2 |
|
BLAKE2b-256 | 8ce03282913c10a4b701176d615f5c7209dd2c0c2aef52a435bed04e204dc00b |