Skip to main content

Simple math calculator

Project description

Simple calculator3220

calculator is a python method for simple math actions. Starting memory value = 0

Installation

pip install calculator3220

Usage

Make a simple math actions like addition, substraction, divide, multiply, root:

>>> import calculator3220
>>> calculator = calculator3220.Calculator()
  • Adding number to memory value(memory value is 0):
>>> calculator.add(5)
5.0
>>> calculator.add(3)
2.0
  • Substract number from memory value(memory value is 0):
>>> calculator.sub(5)
-5.0
>>> calculator.sub(-9)
4.0
  • Dividing memory value by number(memory value is 80):
>>> calculator.div(5)
16
>>> calculator.div(4)
4
  • Multiply memory value by number(memory value is 5):
>>> calculator.mul(10)
50
>>> calculator.mul(2)
100
  • Root by number of memory value(memory value is 27):
>>> calculator.root(3)
3
  • Reset memory value(memory value is 27):
>>> calculator.reset()
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

calculator3220-0.1.5.tar.gz (2.3 kB view hashes)

Uploaded Source

Built Distribution

calculator3220-0.1.5-py2.py3-none-any.whl (2.7 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