Skip to main content

Calculator

This is a python package hosted on PYPI and can be used to perform basic functions on calculator such as;

  • ADDITION
  • SUBTRACTION
  • DIVISION
  • MULTIPLICATION

It is an open source project with a public repository at https://github.com/linda-oranya/pypi_calculator.

Installation

pypi_calculator requires python3 and can be installed via PYPI

$ pip install ecalculator-pkg-linda-oranya
$ pip install git+https://github.com/linda-oranya/pypi_calculator.git

Usage

The calculator can be used for basic mathematical computation. The calculator has a memory that can reset itself to 0 and also stores previous values, except the memory is reset

Sample Code

from calculator import Calculator

cal = Calculator()

Addition

cal.add(10)

10

Subtraction

subtract

cal.subtract(2)

8

because the memory was not reset, 2 was subtracted from previous value 10

Division For divide, zero division returns None and description

cal.divide(2)

4

cal.divide(0)

number cannot be zero => float division by zero None

cal.memory_val

4

Development

You can contribute to this project by cloning this repo and pushing to a branch for review and merging.

Docker

pypi_calculator is very easy to install and deploy in a Docker container.

By default, the Docker will expose port 8080, so change this within the Dockerfile if necessary. When ready, simply use the Dockerfile to build the image.

License

MIT

It is a Free Software

Release files for ecalculator-pkg-linda-oranya 0.0.4

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

Built distribution (wheel)

Table of built distributions (wheels) for ecalculator-pkg-linda-oranya 0.0.4
File Interpreter ABI Platform
ecalculator_pkg_linda_oranya-0.0.4-py3-none-any.whl Python 3 none any Details

Release files / ecalculator_pkg_linda_oranya-0.0.4-py3-none-any.whl

Download URL ecalculator_pkg_linda_oranya-0.0.4-py3-none-any.whl
Size 3.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bc7e6edd957ce701dd84158dc2250fa7b3ec2be06f29af887bb7e788ea207400
BLAKE2b-256 checksum
How to use checksums
796295d330bd1051e2cd8830857bf5679476b5da099598dcbc4d01bf48593a0a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.6.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5

Release history Release notifications | RSS feed

This release

0.0.4 This release

1 release file

0.0.3

2 release files

0.0.2

1 release file

0.0.1

1 release file

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