The difference between random.random() and random.uniform()is as follows:-
The random.uniform() gives you a random floating-point number in the range [0.0, 1.0) (so including 0.0, but not including 1.0 which is also known as a semi-open range). random.uniform(a, b) gives you a random floating-point number in the range [a, b], where rounding may end up giving you b.
The implementation of random.uniform() uses random.random() directly:
def uniform(self, a, b):
return a + (b-a) * self.random()
To know more about this you can have a look at the following video tutorial:-