while k != True: a = random.randint(1,int(250/x)) b = random.randint(1,int(250/y)) if a*b in denominator(z) and 75<x*a<250 and 75<y*b<250: print(a,b) print("X = ",(x*a),"Y =",(y*b)) print(a*b) print("Panel sayisi:", z/(a*b)) k = TrueBy the help of you i updated randint max integer but i still get some values which is below my desire because random variables are between 1 and int(250/x).I think i have to make some changes on if line to get max(x*a)<250.I cant change randint min value which is 1 because a*b must be in the list which is i generated as a denominator. Do you have any idea ?
Problem Solved. Ty for help