Skip to main content

Generate numbers in a certain range / Get True/False according to a certain percentage

$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  		

Metadata

Release files for generate-random-values-in-range 0.10

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for generate-random-values-in-range 0.10
File Size Uploaded Provenance Actions
generate_random_values_in_range-0.10.tar.gz 4.0 kB Without provenance Details for generate_random_values_in_range-0.10.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for generate-random-values-in-range 0.10
File Interpreter ABI Platform Actions
generate_random_values_in_range-0.10-py3-none-any.whl Python 3 none any Details for generate_random_values_in_range-0.10-py3-none-any.whl

Total release size: 9.9 kB

Release files / generate_random_values_in_range-0.10.tar.gz

Download URL generate_random_values_in_range-0.10.tar.gz
Size 4.0 kB
Tags Source
SHA-256 checksum
How to use checksums
25915087d99b253d73bad10920d8c0bf24bbc4741dceb8808a2ead2461a4ef05
BLAKE2b-256 checksum
How to use checksums
dcf6ede9f25168bb7bb4499935643f9472be918a9a72f6343d75bc6ccf7f941d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Release files / generate_random_values_in_range-0.10-py3-none-any.whl

Download URL generate_random_values_in_range-0.10-py3-none-any.whl
Size 5.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3f223d9aadc19db61cdcb6e217e2a7de6385c4d78e91fc9cb1035f5fbdce5646
BLAKE2b-256 checksum
How to use checksums
4b95162b0ed31845173ea697739741634206d95238372087a72f35924dfa5b0e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Security for generate-random-values-in-range 0.10

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.10 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page