-
-
Save pat-hanbury/0d2d3b283b5e5ff8b53f11d78c8d300a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def get_rand_number(min_value, max_value): | |
""" | |
This function gets a random number from a uniform distribution between | |
the two input values [min_value, max_value] inclusively | |
Args: | |
- min_value (float) | |
- max_value (float) | |
Return: | |
- Random number between this range (float) | |
""" | |
range = max_value - min_value | |
choice = random.uniform(0,1) | |
return min_value + range*choice |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment