Calculator class package with basic functions
Project description
#Calculator
Create instances of calculator as a class in python.
###Functions included:
- add - sums calculator memory with provided value.
- minus - subtracts the entered value from calculator memory.
- multiply - multiplies calculator memory by the input value.
- divide - devides the calculator memory by the input value.
- root - takes n root from the calculator memory value (square root is taken when no input given).
- reset - Resets calculator instance memory to zero.
Each function adjusts the calculator memory, as well as returns the new value.
###Installation
pip install calculator_rm==0.0.3
###Usage
from calculator_rm import calculator
calc_obj = calculator.Calculator() # creates an object instance
calc_obj.add(1) # adds 1 to the instance
calc_obj.minus(2) # subtracts 2 from the instance
calc_obj.multiply(3) # multiplies the instnace by 3
calc_obj.divide(4) # divides the instnace by 4
calc_obj.root() # returns square root of the instance
calc_obj.root(5) # returns root 5 of the instance
calc.obj.reset() # resets instance back to zero.
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_rm-0.0.3.tar.gz
(2.6 kB
view details)
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_rm-0.0.3.tar.gz.
File metadata
- Download URL: calculator_rm-0.0.3.tar.gz
- Upload date:
- Size: 2.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.28.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e77ff6ffafef167025de0b584ba59af4ae4252ed1f15453d7a1b705eb9975605
|
|
| MD5 |
cab2f4cf84a4d7310c2866f3fd90cda5
|
|
| BLAKE2b-256 |
db05195d77bc0c3df5b1317482bb64866c26a5ae94660f73583ef6a7c1ff5554
|
File details
Details for the file calculator_rm-0.0.3-py3-none-any.whl.
File metadata
- Download URL: calculator_rm-0.0.3-py3-none-any.whl
- Upload date:
- Size: 3.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.28.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6377c3d77a3b258161ef2f7a03ca212be180de18095f47336cec3173e609ce85
|
|
| MD5 |
39bf9cad6e6720a3dab3b8103a23f1b8
|
|
| BLAKE2b-256 |
8dddda16dd62dfab778078ae4404dd7bc545cb1faa374098303cb97ebdd7cd97
|