Skip to main content

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

rounded_calculate-0.1.1.tar.gz (9.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rounded_calculate-0.1.1-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

Details for the file rounded_calculate-0.1.1.tar.gz.

File metadata

  • Download URL: rounded_calculate-0.1.1.tar.gz
  • Upload date:
  • Size: 9.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.8

File hashes

Hashes for rounded_calculate-0.1.1.tar.gz
Algorithm Hash digest
SHA256 ca9b692a4cd611a4659f18e20e704451c555ebc2b6331e4fa0ec21262aa66510
MD5 706d20337869c39b35f99432b385de6c
BLAKE2b-256 8d9e1debfaf62310e3204c147deae965dce58ecf5d61428f87d9d0fb08ea5c35

See more details on using hashes here.

File details

Details for the file rounded_calculate-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for rounded_calculate-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 033c47a56e9da89e031c63c6ae51d5994d6c784c4ec15257ab0c3935159f8943
MD5 64531ab153276e2fa46e68c6aeb74d9d
BLAKE2b-256 dcc00efc1f98ba156980c117f9828e315250705657d0c29afdac958c673d86f4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page