I\'m trying to generate a random number between 0.1 and 1.0.
We can\'t use rand.randint because it returns integers.
We have also tried random.uniform(0.1
How "accurate" do you want your random numbers? If you're happy with, say, 10 decimal digits, you can just round random.uniform(0.1, 1.0) to 10 digits. That way you will include both 0.1 and 1.0:
round(random.uniform(0.1, 1.0), 10)
To be precise, 0.1 and 1.0 will have only half of the probability compared to any other number in between and, of course, you loose all random numbers that differ only after 10 digits.