Make the math challenge a smidgen more challenging and varied..

This commit is contained in:
ltning 2024-08-11 15:52:40 +00:00
parent 5d4e325dd1
commit 9997ada0ef

View file

@ -8,8 +8,8 @@ local sock = assert(ngx.req.socket(true))
-- (otherwise we'd be asking the same question every time we restart nginx).
math.randomseed(os.time())
-- Generate the actual math quiz..
local num1 = math.random(2,5)
local num2 = math.random(2,4)
local num1 = math.random(1,8)
local num2 = math.random(1,9-num1)
-- ...we should probably know the answer, too..
local ans = num1+num2