A simple calculator for arithmetic operations in python
Project description
PySimpleCalculator
This is a python package hosted on PYPI and can be used to perform basic functions on calculator such as;
- ADDITION
- SUBTRACTION
- DIVISION
- MULTIPLICATION
- FINDING THE ROOT OF A NUMBER
- FINDING THE POWER OF A NUMBER
Getting Started
Installation
pypi_calculator requires python3 and can be installed via PYPI
$ pip install git+https://github.com/Sherlocked-Blaire/PySimpleCalculator.git
Usage
The calculator can be used for basic operations.he calculator has a memory that caches the last result until it is reset. The cached result is used in the next computation if not reset.
Examples will be shown below
Sample Code
from SimpleCalculator import Calculator
calculator = Calculator()
Addition
>>> calculator.add(200)
200
Subtraction
subtract
>>> my_cal.subtract(54)
146
because the memory was not reset, 54
was subtracted from previous value 200
Division
>>> calculator.divide(2)
73
because the memory was not reset, 146
was divided by 2
Reset Memory
>>> calculator.reset()
>>> calculator.current_value()
0
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 pySimpleCalculator-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0d41c4d2f57526ed4bbe4c3c00c695de12f92805e14693f3fe7637a5c420f557 |
|
MD5 | f8fecfd2a5bdc9600bc5f7dec90641f3 |
|
BLAKE2b-256 | 540c86a39c4bf4fc326b867324c01d125d82728e68aac3e805539901f83b79df |