Module:Doru

local p = {} function prime(n) for i = 2, n^(1/2) do       if (n % i) == 0 then return i       end end return true end function ternary ( cond, T , F ) if cond then return T else return F end end function p.n( frame ) math.randomseed(os.time) local rng = math.random(1,666) local isprime = prime(rng) local iseven = rng % 2 == 0 return      Your lucky number is   .. rng .. [[!

Is it even?

]] .. ternary(iseven, 'Yes!', 'No!') .. [[

Is it a prime number?

]] .. ternary(isprime == true, "Yes!", "No! It is divisible by " .. tostring(isprime)) .. end return p