A package for performing a calculations
Project description
Mycounter
The project basically works as a calculator's principle. It can do addition, subtraction, multiplication, division as well as take a root with selected level(y). It has it's own memory and function to reset memory to 0.
Functions:
- add(x, y) - addition of two numbers (x, y);
- sub(x, y) - subtraction of two numbers (x, y);
- mul(x, y) - multiplication of two numbers (x, y);
- div(x, y) - division of two numbers (x, y);
- roo(x, y) - root with selected level(y) of number x;
- memory() - returns last calculated number;
- reset() - resets number to 0.
Installation
Install "mycounter" project using pip install:
!pip install git+https://github.com/ShariYo/mycounter.git
Usage/Examples
import mycounter from Calculator
a = Calculator().add(2, 2)
print(a)
>>> 4
b = Calculator().sub(3, 2)
print(b)
>>> 1
c = Calculator().mul(5, 2)
print(c)
>>> 10
d = Calculator().div(8, 2)
print(d)
>>> 4
e = Calculator().roo(25, 2)
print(e)
>>> 5
a = Calculator().add(2, 2)
mem = Calculator.memory
print(mem)
>>> 4
res = Calculator().reset
print(res)
>>> 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 calc_package-0.1.0.tar.gz.
File metadata
- Download URL: calc_package-0.1.0.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.31.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a96f357992c4b5b29492e46c62edff7104a8e0a19acedab6365f495477ea1eea
|
|
| MD5 |
f0e1e0fb89a7ca1c25d5a9cb7822c355
|
|
| BLAKE2b-256 |
ff3978cb2146fe7f3a425f58c67611045255a3a2c0a1b18995e886ed36d1ffee
|
File details
Details for the file calc_package-0.1.0-py2.py3-none-any.whl.
File metadata
- Download URL: calc_package-0.1.0-py2.py3-none-any.whl
- Upload date:
- Size: 3.6 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.31.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b114b566b42bb9eae9c4f760ecdab4a30771cae65e2b2960aadb6dcae28cc64b
|
|
| MD5 |
c0994cfae3c46002222a55a43f5e4464
|
|
| BLAKE2b-256 |
1741e98f13a3204fdc6bc98c2a296e957e0213f5f015103629d29a5c4168f43d
|