Refactor method

Use `random.randint` instead of `random.randrange`. The former returns a number
N where `a <= N <= b`.