randrange(start, stop) only takes integer arguments. So how would I get a random number between two float values?
randrange(start, stop)
Use random.uniform(a, b):
>>> random.uniform(1.5, 1.9) 1.8733202628557872
2.1m questions
2.1m answers
60 comments
57.0k users