I am new to Python and trying to create a program for a project. First, I need to create a dot between the numbers 0-1.0, including 0 and 1.0 ([0, 1.0]). I was looking for the python library for functions ( https://docs.python.org/2/library/random.html ) and I found this function:
random.random()
This will return the next random floating point number in the range [0.0, 1.0]. This is a problem because it does not include 1. Although the chances of creating 1 are slim in any case, it is still important because it is a scientific program that will be used in a larger data set.
I also found this function:
rand.randint
This will return an integer, which is also a problem.
I researched on the site and previously asked questions and found that this function:
random.uniform(a, b)
, , b.
- , python, [0, 1.0]?
, , . .
* .