# File lib/annoy.rb, line 95 95: def Annoy.numeric_question(factor=:medium) 96: equation = answer = 0 97: while answer < 10 98: vals = [rand(@@randsize[factor])+1, 99: @@operators[factor][ rand(@@operators[factor].size) ], 100: rand(@@randsize[factor])+1 ] 101: equation = "(%d %s %d)" % vals 102: answer = eval(equation) 103: end 104: [equation, answer] 105: end