Basic operations calculator
Project description
Description
calculator.py includes a class 'Calculator' which performs basic calculator operations
Installation
pip install anirtic_calculator
Importing a package
from anirtic_calculator.calculator import Calculator
Attributes
memory : float Calculator memory
Methods
add(number): Takes the number and adds it to calculator memory
subtract(number): Takes the number and subtracts it from calculator memory
multiply(number): Multiplies calculator memory by a given number
divide(number): Divides calculator memory by a given number
root(number): Takes the n root of calculator memory
reset(): Resets calculator memory
Example
from anirtic_calculator import calculator
Calculator.add(2)
2.0Calculator.multiply(3)
6.0Calculator.divide(3)
2.0Calculator.root(2)
1.4142135623730951Calculator.reset()
0.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
Hashes for anirtic_calculator-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4adc434f4b32c7622da9e5918dd60672fc4f1679d8db41aa21083dd60980dc9e |
|
MD5 | 0d2629762c1547791861a737aeb14f2f |
|
BLAKE2b-256 | 1a0731fc85efbb64cf349342a26bbfd453745d11987f585751faebcf802f67e4 |