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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for calculator_gskv_m1_s1-0.1.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 683cb9ef2c84a6b5ddbc47f0a73dc941a47d01fd4e8b31c7f2fb27b377f1daee |
|
MD5 | d54304d1baded406bf5fbbd9c027477a |
|
BLAKE2b-256 | 5b9106c49ca418dade22dc0fce8a93d4bdb1f9fdfd6adba9e0ce974da7c56553 |
Close
Hashes for calculator_gskv_m1_s1-0.1.3-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 331d8513086467a03298233ea59eba76563a143e6300732962658a3d77e406bd |
|
MD5 | 07b780806df584fa8b9e16077ea35f61 |
|
BLAKE2b-256 | 88f65f5332f2838ac4017be14c7e6f0c18b46fd0d71124d8871989e0f93ba17a |