Skip to main content

Basic arithmetics calculator

Project description

patcalc

Basic arithmetics calculator with memory

Installation

pip install patcalc

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.4.tar.gz (8.7 kB view details)

Uploaded Source

Built Distribution

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

patcalc-0.1.4-py2.py3-none-any.whl (3.3 kB view details)

Uploaded Python 2Python 3

File details

Details for the file patcalc-0.1.4.tar.gz.

File metadata

  • Download URL: patcalc-0.1.4.tar.gz
  • Upload date:
  • Size: 8.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.28.1

File hashes

Hashes for patcalc-0.1.4.tar.gz
Algorithm Hash digest
SHA256 038fb5acf105c8fb04aeb3efb147e6c84afe2bd23ede6cab603092d96a723576
MD5 bd91cec0f50a4c8f829e323c9bedfd19
BLAKE2b-256 6c2f3d3441b8c65e504b34caecd8ade813ca95d1405634abf1d73fd93723f028

See more details on using hashes here.

File details

Details for the file patcalc-0.1.4-py2.py3-none-any.whl.

File metadata

  • Download URL: patcalc-0.1.4-py2.py3-none-any.whl
  • Upload date:
  • Size: 3.3 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.28.1

File hashes

Hashes for patcalc-0.1.4-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 a7d58c6cac379a77b5f614efa4df8d44fe1cf4a281335c7eb2a0fbc6bb98e818
MD5 87956bcbebdc45e4d73c4d03188939d3
BLAKE2b-256 26fd51d28051950df33b0c56a340248450b768d2ba64f245d6fda00edcc02b52

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