import random def game(size): position = 1 while position != size: throw = random.randint(1,6) if position + throw <= size: position += throw if position % 13 == 0: position -= 3 ## check size before comparing if is int? def param_check(param): if param < 10 or param is int: return random.seed(100) game(13) #param_check("a")