def rand_in_range(lower, upper): """Generate random number between lower and upper""" return (random.random() * (upper - lower)) + lower