Skip to main content

Simple calculator package

Project description

calculator_102

calculator_102 is a Python package that contains functions for simple calculation.

Installation

Use the package manager pip to install calculator_102.

pip install calculator_102

Usage

Calculator has its own memory, meaning it can manipulate its starting number 0 until it is reset.

Features:

>>> calculator = Calculator()
  • memory

    shows current value in memory:

# Memory value = 50
>>> calculator.memory()
50
  • add

    adds number to memory value:

# Memory value = 0
>>> calculator.add(2)
2
  • subtract

    subtracts number from memory value:

# Memory value = 10
>>> calculator.subtract(4)
6
  • multiply

    multiplies memory value by number:

# Memory value = 10
>>> calculator.multiply(2)
20
  • divide

    divides memory value by number:

# Memory value = 10
>>> calculator.divide(2)
5.0
  • n_root

    finds the root of memory value by the inputted number:

# Memory value = 100
>>> calculator.n_root(2)
10.0
  • reset

    resets memory value to its initial value - 0:

# Memory value = 100
>>> calculator.reset()
# Memory value = 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

calculator_102-0.1.7.tar.gz (2.5 kB view details)

Uploaded Source

Built Distribution

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

calculator_102-0.1.7-py2.py3-none-any.whl (2.9 kB view details)

Uploaded Python 2Python 3

File details

Details for the file calculator_102-0.1.7.tar.gz.

File metadata

  • Download URL: calculator_102-0.1.7.tar.gz
  • Upload date:
  • Size: 2.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.27.1

File hashes

Hashes for calculator_102-0.1.7.tar.gz
Algorithm Hash digest
SHA256 f1ed769f1ad91cf7c07716c518c6d429e3f794c71071bfcac5732e09d19bd981
MD5 7fabcc90de6a07ecf433c0650417a7de
BLAKE2b-256 8d523c4b32739462f6e74bea89d5d7268f5b2787b95d54df4a8b02f2a4033b45

See more details on using hashes here.

File details

Details for the file calculator_102-0.1.7-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for calculator_102-0.1.7-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 465700bfba499dbe5e409d5835da8a2d743771c1c24ced77226b0c55bf39eb13
MD5 703f1fa7b2c78abe577f92132fffa9d2
BLAKE2b-256 8ce03282913c10a4b701176d615f5c7209dd2c0c2aef52a435bed04e204dc00b

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