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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file anirtic_calculator-0.0.4.tar.gz.
File metadata
- Download URL: anirtic_calculator-0.0.4.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
19ca10955c22a992f023e65a640816ce79807075418d775ddae26d51a04f2aef
|
|
| MD5 |
37475027bad91ed7d8696d5dac1a0b14
|
|
| BLAKE2b-256 |
c66a53dd7b64a2048f6d29755c05d2d81894ed0152011552c3a06ae0488d8c1e
|
File details
Details for the file anirtic_calculator-0.0.4-py3-none-any.whl.
File metadata
- Download URL: anirtic_calculator-0.0.4-py3-none-any.whl
- Upload date:
- Size: 3.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
968d88a55b7e29cbd52b1cb40dbb1eba3b2d2f9f7423501cf383d504cc3dcffb
|
|
| MD5 |
899144ed8a1a3f86ac254e6e8910c49b
|
|
| BLAKE2b-256 |
b71c9b1cd6ed22bf0a20e6b73cc58393da3c82e13293df3f57eff7eb1b8f4e69
|