A package to generate arithmetic expression
Project description
pyarithmeticlib
A package to generate arithmetic expression
Installation
$ pip install pyarithmeticlib
Usage
pyarithmeticlib can be used to generate arithmetic expressions as follows:
from pyarithmeticlib.expression import Addition, Multiplication
from pyarithmeticlib.generator import ExpressionGenerator
generator = ExpressionGenerator(
max_depth=2, min_length=2, max_length=4, min_value=1,
max_value=10, min_n_operands=1, max_n_operands=3,
allowed_operations={Addition, Multiplication}, seed=42
)
for expr in generator.yield_expressions(5):
print(expr)
Contributing
Interested in contributing? Check out the contributing guidelines. Please note that this project is released with a Code of Conduct. By contributing to this project, you agree to abide by its terms.
License
pyarithmeticlib was created by amaurylekens. It is licensed under the terms of the MIT license.
Credits
pyarithmeticlib was created with cookiecutter and the py-pkgs-cookiecutter template.
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 pyarithmeticlib-0.1.0.tar.gz.
File metadata
- Download URL: pyarithmeticlib-0.1.0.tar.gz
- Upload date:
- Size: 6.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.11.8 Darwin/21.3.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
78930a3a910b88a5dc1a7cab7ff8cc7b053728cdad38fd5c452df2a49717dce6
|
|
| MD5 |
5cfc5aa8cd4df1fd3e513588a465cc76
|
|
| BLAKE2b-256 |
1b72a7708cd4c3cc1a7a8e54fdb5d1dec9b95c3032ecdc6fdc0fb3b4927a0767
|
File details
Details for the file pyarithmeticlib-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pyarithmeticlib-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.11.8 Darwin/21.3.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
125fde6433f98850b5d43dd16fa2245128d0ee1cc47b96463c60add3ee72bca6
|
|
| MD5 |
3807ed37c0aff9aab956b3fbb866eb14
|
|
| BLAKE2b-256 |
dfa7e59f4305dc832eb7ea06c3f38fb56462dd8349dbee8d96d18a7d3dc71657
|