Skip to main content

A simple arithmetic calculator package

Project description

Arithmetic Calculator Module

This module is a simple arithmetic calculator. It can perform addition, subtraction, multiplication, and division. It can also perform square root and resetting opertations.

Installation via pip

Use the package manager pip to install the module.

pip install calculator-module

Installation via Docker

Use the package manager docker to install the module.

docker pull minasefikadu/calc_image

Usage

from calculator import Calculator

calculator = Calculator()

calculator.add(2)  # adds 2 to the current value
calculator.subtract(10) # subtracts 10 from the current value
calculator.multiply(50) # multiplies the current value by 50
calculator.divide(2) # divides the current value by 2
calculator.square_root(9, 2) # returns the nth root of the current value
                             # in this case, the square root of 9
calculator.reset() # resets the current value to 0

Contributing

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

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_module-0.0.2.tar.gz (3.2 kB view hashes)

Uploaded Source

Built Distribution

calculator_module-0.0.2-py3-none-any.whl (3.8 kB view hashes)

Uploaded 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