Rounded calculator package
Project description
Rounded calculator
Features
This package allows users to calculate addition, substraction, division, multiplication and power of n root of active memory value. Also package users can print history of calculations and undo last actions to access specific history values. All calculations made with this package are rounded to 8 decimal points.
Getting started
Instalation of the Rounded Calculate package is done by running command
pip install rounded-calculate
Package usage
Init Calculator
Assign Calculator class to desired variable
calculator = Calculator()
All the calculations made by the Calculator is based on value of the Calculator memory.
Calculator class contains class of Memory which is storing all the history of calculations performed by using this package.
Calculator functions
All Calculator methods returns calculation result where operand 1 is current value of calculator memory and operand 2 is called method parameter. This do not apply for memory related methods.
calculator.add(n)
Adds parameter n to calculator memory value. Returns new calculator memory value.
calculator.substract(n)
Substracts parameter n from calculator memory value. Returns new calculator memory value.
calculator.multiply(n)
Multiplies calculator memory value by power of parameter n. Returns new calculator memory value.
calculator.divide(n)
Divides calculator memory value by power of parameter n. Returns new calculator memory value.
calculator.root(n)
Adds parameter n to last calculation of calculator outcome. Returns new calculator memory value.
calculator.undo()
Removes last entry of calculator history.
calculator.reset_memory()
Deletes all calculations history, sets next calculation base to 0.
calculator.print_history()
Prints all calculations history.
License
Licensed under the MIT License.
Project details
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 rounded_calculate-0.0.2.tar.gz.
File metadata
- Download URL: rounded_calculate-0.0.2.tar.gz
- Upload date:
- Size: 8.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e06fe6628d84f32214d8484afea67e3536bb0a6459c5e4ec5b68855188a0260a
|
|
| MD5 |
08f570ab8d452b07e33fabedd94658ce
|
|
| BLAKE2b-256 |
a1cd06613313fcb8b06bd0acacd9835d490fcdff29c35e9d64dcbd5c9b85ea77
|
File details
Details for the file rounded_calculate-0.0.2-py3-none-any.whl.
File metadata
- Download URL: rounded_calculate-0.0.2-py3-none-any.whl
- Upload date:
- Size: 4.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f61bc6280ed938b972b7ffc3120bb2377d8a03b6cd5cbc4ddb73e111432fb298
|
|
| MD5 |
60bf493526d130a500b0d9027168c3e2
|
|
| BLAKE2b-256 |
e72575f1b1c6149a666c972f5fc42e1ac92aa16a89a73022a7d476ae9b3d7004
|