A calculator that can do basic arithmetic operations via the objects
Project description
Calculator
This calculator is a library than can be used for simple arithmetic operations. A calculator object should be created from the Calculator class defined inside the module. The object will have a "memory" attribute which will be operated upon and returned by the Calculator methods.
Installation
Use the package manager pip to install ausmints_calculator.
pip install ausmints_calculator
Usage
from ausmints_calculator import Calculator
calc = Calculator()
calc.memory # returns 0
calc.add(5) # returns 5
calc.squared() # returns 25
calc.reset_memory() # returns 0
For more extensive examples see the test file
Docker
A Dockerfile is added that can be used to create python 3.8 environment with the calculator module already installed
Roadmap
- A functionality that saves and remembers the "memory" variable between sessions could be created.
- Functionality that allows the user to save various results into a different memory variable (maybe a dict type). These values could be later accessed and set as active.
Changelog
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
ausmints_calculator-0.2.1.tar.gz
(135.4 kB
view hashes)
Built Distribution
Close
Hashes for ausmints_calculator-0.2.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4a4673bb47286c554f90b3719ccf573897a398dd4fd42514d5a89e35deded891 |
|
MD5 | 876ce1f4a8115895aedd0b8e22620e62 |
|
BLAKE2b-256 | c1036f13378b840fa78ae2664738a23aa0aa438c5140e50c06a9c330671acdca |
Close
Hashes for ausmints_calculator-0.2.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2abbe3e9edcfe9e93a12dbed005c59bb5c84ef51da8c3b985e1acc49f678b9b1 |
|
MD5 | 66dab260f1a1257bd77ab6017629c3ed |
|
BLAKE2b-256 | 21b19475e15d033e495d0d14c9529f45e640270ae2122f9eae134309f2161cbd |