# Generate numbers in a certain range / Get True/False according to a certain percentage
```python
$pip install generate-random-values-in-range
from generate_random_values_in_range import randomize_number,get_true_false_percent
for _ in range(200):
randval = randomize_number(
value=620,
percent=20,
percentage_substract_vs_add=70,
minimum_to_allow=580,
maximum_to_allow=700,
)
if _ % 20 == 0:
print("")
print(randval, end=" ")
694 666 643 580 614 619 700 700 580 653 700 580 583 603 646 700 580 609 580 580
580 580 580 700 580 700 697 580 700 614 580 649 580 610 600 582 580 580 587 580
605 580 580 595 602 620 584 592 700 700 698 580 580 609 580 622 644 580 580 580
590 580 652 591 666 607 580 610 580 580 580 594 615 580 594 580 612 679 607 580
639 700 621 665 587 622 585 580 599 580 580 600 580 580 700 700 580 580 599 580
610 580 596 580 696 580 661 589 589 618 612 580 580 580 635 634 580 580 606 580
581 580 612 580 580 580 602 580 580 700 580 580 580 580 700 580 580 580 691 609
580 580 648 580 580 580 605 580 580 580 700 699 615 580 643 700 580 595 700 580
697 580 580 630 580 580 585 582 580 593 619 580 596 688 580 581 700 580 580 580
627 580 580 580 584 598 580 610 580 583 590 700 580 675 580 684 580 590 580 700
for _ in range(100):
randval = get_true_false_percent(percent_true=80)
if _ % 20 == 0:
print("")
if randval is True:
print(randval, end=" ")
else:
print(randval, end=" ")
True False True True True False True True True True True True True True True True True True True True
True True False True True False True True True True True True True True True True True True True True
True True True True True False True True False True True True True True True True True False True True
False True True True True True True False False True True True True True True True True True True False
True True False True True True True True True True True True True False True True True False True True
```
Raw data
{
"_id": null,
"home_page": "https://github.com/hansalemaos/generate_random_values_in_range",
"name": "generate-random-values-in-range",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "random,numbers,bot",
"author": "Johannes Fischer",
"author_email": "<aulasparticularesdealemaosp@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/dc/f6/ede9f25168bb7bb4499935643f9472be918a9a72f6343d75bc6ccf7f941d/generate_random_values_in_range-0.10.tar.gz",
"platform": null,
"description": "\n# Generate numbers in a certain range / Get True/False according to a certain percentage\n\n\n\n\n\n```python\n\n\n\n$pip install generate-random-values-in-range\n\nfrom generate_random_values_in_range import randomize_number,get_true_false_percent\n\n\n\n\n\nfor _ in range(200):\n\n randval = randomize_number(\n\n value=620,\n\n percent=20,\n\n percentage_substract_vs_add=70,\n\n minimum_to_allow=580,\n\n maximum_to_allow=700,\n\n )\n\n if _ % 20 == 0:\n\n print(\"\")\n\n print(randval, end=\" \")\n\n\n\n694 666 643 580 614 619 700 700 580 653 700 580 583 603 646 700 580 609 580 580 \n\n580 580 580 700 580 700 697 580 700 614 580 649 580 610 600 582 580 580 587 580 \n\n605 580 580 595 602 620 584 592 700 700 698 580 580 609 580 622 644 580 580 580 \n\n590 580 652 591 666 607 580 610 580 580 580 594 615 580 594 580 612 679 607 580 \n\n639 700 621 665 587 622 585 580 599 580 580 600 580 580 700 700 580 580 599 580 \n\n610 580 596 580 696 580 661 589 589 618 612 580 580 580 635 634 580 580 606 580 \n\n581 580 612 580 580 580 602 580 580 700 580 580 580 580 700 580 580 580 691 609 \n\n580 580 648 580 580 580 605 580 580 580 700 699 615 580 643 700 580 595 700 580 \n\n697 580 580 630 580 580 585 582 580 593 619 580 596 688 580 581 700 580 580 580 \n\n627 580 580 580 584 598 580 610 580 583 590 700 580 675 580 684 580 590 580 700 \n\n\n\n\n\nfor _ in range(100):\n\n randval = get_true_false_percent(percent_true=80)\n\n if _ % 20 == 0:\n\n print(\"\")\n\n if randval is True:\n\n print(randval, end=\" \")\n\n else:\n\n print(randval, end=\" \")\n\n\n\nTrue False True True True False True True True True True True True True True True True True True True \n\nTrue True False True True False True True True True True True True True True True True True True True \n\nTrue True True True True False True True False True True True True True True True True False True True \n\nFalse True True True True True True False False True True True True True True True True True True False \n\nTrue True False True True True True True True True True True True False True True True False True True \t\t\n\n\n\n```\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Generate numbers in a certain range / Get True/False according to a certain percentage",
"version": "0.10",
"project_urls": {
"Homepage": "https://github.com/hansalemaos/generate_random_values_in_range"
},
"split_keywords": [
"random",
"numbers",
"bot"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "4b95162b0ed31845173ea697739741634206d95238372087a72f35924dfa5b0e",
"md5": "cb61d3a01366e3dd847fba55c43afcb8",
"sha256": "3f223d9aadc19db61cdcb6e217e2a7de6385c4d78e91fc9cb1035f5fbdce5646"
},
"downloads": -1,
"filename": "generate_random_values_in_range-0.10-py3-none-any.whl",
"has_sig": false,
"md5_digest": "cb61d3a01366e3dd847fba55c43afcb8",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 5919,
"upload_time": "2022-11-18T00:59:04",
"upload_time_iso_8601": "2022-11-18T00:59:04.481516Z",
"url": "https://files.pythonhosted.org/packages/4b/95/162b0ed31845173ea697739741634206d95238372087a72f35924dfa5b0e/generate_random_values_in_range-0.10-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "dcf6ede9f25168bb7bb4499935643f9472be918a9a72f6343d75bc6ccf7f941d",
"md5": "265b62369a316cdf0c10d02627d99e82",
"sha256": "25915087d99b253d73bad10920d8c0bf24bbc4741dceb8808a2ead2461a4ef05"
},
"downloads": -1,
"filename": "generate_random_values_in_range-0.10.tar.gz",
"has_sig": false,
"md5_digest": "265b62369a316cdf0c10d02627d99e82",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 3957,
"upload_time": "2022-11-18T00:59:06",
"upload_time_iso_8601": "2022-11-18T00:59:06.158984Z",
"url": "https://files.pythonhosted.org/packages/dc/f6/ede9f25168bb7bb4499935643f9472be918a9a72f6343d75bc6ccf7f941d/generate_random_values_in_range-0.10.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2022-11-18 00:59:06",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "hansalemaos",
"github_project": "generate_random_values_in_range",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [],
"lcname": "generate-random-values-in-range"
}