Skip to main content

A calculator that can do basic arithmetic operations via the objects

Project description

Calculator

This calculator is a library than can be used for simple arithmetic operations. A calculator object should be created from the Calculator class defined inside the module. The object will have a "memory" attribute which will be operated upon and returned by the Calculator methods.

Installation

Use the package manager pip to install ausmints_calculator.

pip install ausmints_calculator

Usage

from ausmints_calculator import Calculator

calc = Calculator()

calc.memory # returns 0
calc.add(5) # returns 5
calc.squared() # returns 25
calc.reset_memory() # returns 0

For more extensive examples see the test file

Docker

A Dockerfile is added that can be used to create python 3.8 environment with the calculator module already installed

Roadmap

  • A functionality that saves and remembers the "memory" variable between sessions could be created.
  • Functionality that allows the user to save various results into a different memory variable (maybe a dict type). These values could be later accessed and set as active.

Changelog

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

ausmints_calculator-0.2.1.tar.gz (135.4 kB view hashes)

Uploaded Source

Built Distribution

ausmints_calculator-0.2.1-py2.py3-none-any.whl (163.2 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