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.0.3.tar.gz (8.9 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.0.3-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: rounded_calculate-0.0.3.tar.gz
  • Upload date:
  • Size: 8.9 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.0.3.tar.gz
Algorithm Hash digest
SHA256 b3820fa5a78f2f2cec1d685980979ff0d9f95649e16e970b6701e26ec330b99c
MD5 b82f37e00f5f25f4766f00a0c8ab2dcc
BLAKE2b-256 bbfe33de43f1f2942471b0dc708a9a90c068579e9c1aa0608c484b6159b5a1b6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for rounded_calculate-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 b83056b209f139cd87fb1b5ae31c03c5ad3fb90bdc0769a7d3a7aae4f647b6f3
MD5 1ca4812f1b3b15f83e8585a61fee81ed
BLAKE2b-256 72fd249374b5cd0268683905686058451de5b382346f9e4a64971fc08119ba9c

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