I am not quite sure what exactly you are asking but the get a random integer value inside a range you could use randint(min_value, max_value). This works for integers. To get a random value between 100 and 900 you would use randint(100, 900). If you have a smaller range and want fractions as well you could use min_value + random() * (max_value - min_value) eg 100 + (900-100) * random() I hope that helps, good luck!