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.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 968d88a55b7e29cbd52b1cb40dbb1eba3b2d2f9f7423501cf383d504cc3dcffb |
|
MD5 | 899144ed8a1a3f86ac254e6e8910c49b |
|
BLAKE2b-256 | b71c9b1cd6ed22bf0a20e6b73cc58393da3c82e13293df3f57eff7eb1b8f4e69 |