I want to generate a random number with 1 decimal point between min_time and m_time, like 0.3
Now I have a really quirk solution
m_time = 0.5
min_time = 0.2
float(randint(int(min_time * 10), int(m_time * 10))) / 10
it works, but I’m wondering if there is a better solution?
I think the preferred way is to uniformly choose a floating number between
min_timeandmax_timeand then use the built-in round function (to the first decimal place):