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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file calculator_102-0.1.7.tar.gz.
File metadata
- Download URL: calculator_102-0.1.7.tar.gz
- Upload date:
- Size: 2.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.27.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f1ed769f1ad91cf7c07716c518c6d429e3f794c71071bfcac5732e09d19bd981
|
|
| MD5 |
7fabcc90de6a07ecf433c0650417a7de
|
|
| BLAKE2b-256 |
8d523c4b32739462f6e74bea89d5d7268f5b2787b95d54df4a8b02f2a4033b45
|
File details
Details for the file calculator_102-0.1.7-py2.py3-none-any.whl.
File metadata
- Download URL: calculator_102-0.1.7-py2.py3-none-any.whl
- Upload date:
- Size: 2.9 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.27.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
465700bfba499dbe5e409d5835da8a2d743771c1c24ced77226b0c55bf39eb13
|
|
| MD5 |
703f1fa7b2c78abe577f92132fffa9d2
|
|
| BLAKE2b-256 |
8ce03282913c10a4b701176d615f5c7209dd2c0c2aef52a435bed04e204dc00b
|