While the code could use streamlining by only drawing one randint and comparing it to a static number, the probability of orangethirty's way of doing it still gives the correct probability of 1/6. Think of it as two dice, the chance of rolling doubles is 6/36 = 1/6.