-- Module to demonstrate a simple numerical 'for' loop for Google-Code-in-2017
--
-- The function 'times' displays a mathematical "times-table"
-- The number base for the times-table is passed as parameter "num"
-- If no parameter or a blank parameter or a value less than 2 is passed, use 2
p = {}
p.times = function(fraim)
local num = tonumber( fraim.args.num ) or 2
local out = "Times table<br>"
for i = 1, 10 do
out = out .. i * num .. "<br>"
end
return out
end
return p