Skip to main content

Calculator

Perform basic math operations with internal memory

Calculator methods:

  • add - add a real number to the internal memory value
  • subtract - subtract a real number from the internal memory value
  • multiply - multiply the internal memory value by a real number
  • divide - divide the internal memory value by a real number
  • root - take (n) root of the internal memory value
  • reset - reset the internal memory value

Installation

pip install pycalc3

Usage

>>> from pycalc3.calculator import Calculator
>>> cal = Calculator()
>>> cal.add(12)
>>> cal.memory_value
12.0
>>> cal.subtract(3)
>>> cal.memory_value
9.0
>>> cal.multiply(3)
>>> cal.memory_value
27.0
>>> cal.divide(3)
>>> cal.memory_value
9.0
>>> cal.root(2)
>>> cal.memory_value
3.0
>>> cal.reset()
>>> cal.memory_value
0.0

Changelog

License

MIT

Metadata

Release files for pycalc3 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pycalc3 0.0.3
File Size Uploaded
pycalc3-0.0.3.tar.gz 7.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pycalc3 0.0.3
File Interpreter ABI Platform
pycalc3-0.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 10.3 kB

Release files / pycalc3-0.0.3.tar.gz

Download URL pycalc3-0.0.3.tar.gz
Size 7.4 kB
Tags Source
SHA-256 checksum
How to use checksums
b0fea917c4355c4438638ec5accab470f20ede9f0de6878a5681812d18bc5483
BLAKE2b-256 checksum
How to use checksums
ca1de807e0c8bd2f5aeca36a468405081bdaa64ec13fab8c957ef4cacd19b1de
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.27.1

Release files / pycalc3-0.0.3-py3-none-any.whl

Download URL pycalc3-0.0.3-py3-none-any.whl
Size 2.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1903b72121dbad4cc9bd24dbd2c0e42837eca3951aa05997920b3f2d59a36bcb
BLAKE2b-256 checksum
How to use checksums
eb2a4b141106b33dcd541b7a6fd1bb4591d4c9d2fa024d8aea64b42b94c7984a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.27.1

Release history Release notifications | RSS feed

This release

0.0.3 This release

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page