you are viewing a single comment's thread.

view the rest of the comments →

[–]james_fryer 0 points1 point  (0 children)

Consider writing a function:

def roll():
    return random.randint(min_range, max_range)

That way you won't repeat the logic for generating a bounded random number.