Skip to main content

This module contains a Calculator

Project description

Calculator_gskv_m1_s1

Calculator_gskv_m1_s1 is a Python module for performing simple mathematical operations.

Installation

Use the package manager pip to install calculator_gskv_m1_s1.

pip install calculator_gskv_m1_s1

Usage

import calculator_gskv_m1_s1 as calc

# Initiates a calculator object with a default value of 0
calculator=calc.Calculator()

# Returns the current value of the calculator object
calculator.current_value

# Adds float or int argument to the current value and returns the result
calculator.add(float)

# Subtracts float or int argument from the current value and returns the result
calculator.subtract(float)

# Multiplies the current value by float or int argument and returns the result
calculator.multiply(float)

# Divides the current value by float or int argument and returns the result
calculator.divide(float)

# Raises the current value to the power of float or int argument and returns the result
calculator.exponentiate(float)

# Takes the root of the current value taking the float or int argument as root index
calculator.root(float)

# Resets the current value to zero returns current value
calculator.reset()

Testing

After making changes to the module tests should be run. Testing the package that is installed can be done by running pytest

pytest

Testing the package that is not installed can be done by invoking pytest trough the python interpreter

python -m pytest

Contributors

Gediminas Skvarnavičius

With the help of Turing College

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_gskv_m1_s1-0.1.4.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

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

calculator_gskv_m1_s1-0.1.4-py2.py3-none-any.whl (3.7 kB view details)

Uploaded Python 2Python 3

File details

Details for the file calculator_gskv_m1_s1-0.1.4.tar.gz.

File metadata

  • Download URL: calculator_gskv_m1_s1-0.1.4.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.28.1

File hashes

Hashes for calculator_gskv_m1_s1-0.1.4.tar.gz
Algorithm Hash digest
SHA256 51396990da5e13b8635533bc1e8a89f690228684cbf04b1dc6c17834342727ad
MD5 b3abb8dde5c3a483b3462a5ac8b6aa66
BLAKE2b-256 b0c5b83b734cdf4fa9d1748d7d28dd9d59f5b8633a405c514324ed2a6494979b

See more details on using hashes here.

File details

Details for the file calculator_gskv_m1_s1-0.1.4-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for calculator_gskv_m1_s1-0.1.4-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 51e22ea09bbf74a098b1484a9520cbe6b1f806d8cc8d7b0c8643867cfd68831c
MD5 5908434ab190006149d1c7c60cb2b52e
BLAKE2b-256 0389a7aac9622f6eb154ad78c31dcc6c0045d71d99338ccecabe11153cfa8465

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