Skip to main content

Calculator for basic operation

Project description

Installation

pip install numpy
pip install powerfull-calculator

Usage

With use of this tool you can:

  • add numbers - via add() metod
  • subtract numbers - via subtract() metod
  • multiply numbers - via multiply() metod
  • divide numbers - via divide() metod
  • root numbers - root add() metod

Before start using

There is always number in memory of calculator. Operations are perfomed on this number. You can get it via get_state() method.

>>> from powerful_calculator.powerful_calculator import Calculator
>>> calc = Calculator()
>>> calc.add(0.1)
0.1
>>> calc.add(0.2)
0.3
>>> calc.subtract(10.3)
-10.0
>>> calc.divide(3)
-3.333333333333
>>> calc.multiply(3)
-10.0
>>> calc.root(1/3)
-1000.0
>>> calc.reset()
0.0
>>> calc.get_state()
0.0

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Make sure to add or update tests as appropriate.

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

powerful-calculator-0.1.6.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

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

powerful_calculator-0.1.6-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file powerful-calculator-0.1.6.tar.gz.

File metadata

  • Download URL: powerful-calculator-0.1.6.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.13 CPython/3.10.1 Windows/10

File hashes

Hashes for powerful-calculator-0.1.6.tar.gz
Algorithm Hash digest
SHA256 26cdaad1d5996b139a82e21ea67dc519d5d925b3e5720b17fa67022c799bfe54
MD5 319c08ff6172809066aee12e8fef88a2
BLAKE2b-256 f59d7e6d5c55117139e61ef8df8b5aefd4bef61c75976036392069a9e507767e

See more details on using hashes here.

File details

Details for the file powerful_calculator-0.1.6-py3-none-any.whl.

File metadata

File hashes

Hashes for powerful_calculator-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 575ba1ac7c0a45effb0b3491b847ca77ae386b5195b858f62a4264d219ece8cd
MD5 6976e3e5bf2971d3e1118cd74669f20c
BLAKE2b-256 5ff3bf84a67b345b48ce427f6450a1c356e14cdee3d9b7d9517cc3562bb43e82

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