Adjustable random number generator
Project description
More adjustable random functions
Generating adjustable random values, from min to max with numbers to adjust.
For example, we have values from 1 to 10.
If number 2 and 3 will be in numbers to adjust with k=5, final array will look like this:
[1,2,2,2,2,2,3,3,3,3,3,4,5,6,7,8,9,10]
and chance of random.choice for those values will be increased
Examples
Run basic functions
from adjustable_random import (
get_adjustable_random_list,
get_adjustable_random_value
)
if __name__ == '__main__':
adjustable_list: list[int] = get_adjustable_random_list(
min_value=0,
max_value=100,
numbers_to_adjust=[
10,15
]
)
adjustable_value: int = get_adjustable_random_value(
min_value=0,
max_value=100,
numbers_to_adjust=[
10,15
]
)
print(f"{adjustable_list=}")
print(f"{adjustable_value=}")
Run tests to see how it works
from adjustable_random import (
init_random_values,
run_graph_test
)
if __name__ == '__main__':
values: list[int] = init_random_values()
run_graph_test(values)
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
File details
Details for the file adjustable_random package-1.1.tar.gz
.
File metadata
- Download URL: adjustable_random package-1.1.tar.gz
- Upload date:
- Size: 3.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 848638d5f1fdac982bd8501767af8c9ce218d669d232aff667cf41bbb15f76c0 |
|
MD5 | a17592bf84c1c770949bec7a560a7327 |
|
BLAKE2b-256 | 171d1b70d97c9b77fb5747d895aa658057b706efef207eab6a11efd56d26297b |
File details
Details for the file adjustable_random_package-1.1-py3-none-any.whl
.
File metadata
- Download URL: adjustable_random_package-1.1-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2052c40d528a598560549b09acf26ac2bb116e020926add5a99c059b6e16f56e |
|
MD5 | 35f75bb44aa0aa6655c183aeff66e198 |
|
BLAKE2b-256 | 78306297942fefe3f13938705bf36e1d8bcc1c39ef2aa0cf3652da59c029963a |