Skip to main content

Basic arithmetics calculator

Project description

patcalc

Basic arithmetics calculator with memory

Installation

pip install calc_pck

Usage

>>> from patcalc import Calculator
>>> c = Calculator()
>>> c.add(10)  # Adds 10.0 to memory
10.0
>>> c.subs(-5) # Adds 10.0 to memory
15.0
>>> c.subs(5)  # Adds 10.0 to memory
10.0
>>> c.mult(2)  # Adds 10.0 to memory
20.0
>>> c.div(5)   # Adds 10.0 to memory
4.0
>>> c.root()   # Root from current memory value 4.0
2.0
>>> c.root(25) # Reset memory value to 0.0 and gives the root of the argument
25.0
>>> c.reset()  # Reset memory to 0.0

License

MIT

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

patcalc-0.1.3.tar.gz (2.7 kB view hashes)

Uploaded Source

Built Distribution

patcalc-0.1.3-py2.py3-none-any.whl (3.3 kB view hashes)

Uploaded Python 2 Python 3

Supported by

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