Documentation for this module may be created at Module:Sandbox/MartinPoulter/doc
--This is a comment
--Task 2
-- next line defines an empty table
p = {}
function p.Hello(frame)
return "Hello World"
end
function p.Hi(frame)
local name = frame.args.name or "Jimbo"
return "Say hello to my little friend " .. name .. ".<br />"
end
function p.temperature(frame)
local cel = tonumber(frame.args.celsius) or 0
local fah = cel * 9 /5 + 32
if cel > 16 then
msg = " It is warm."
else
msg = " It is cold."
end
return fah .. " degrees fahrenheit." .. msg
end
function p.times(frame)
local num = tonumber (frame.args.num) or 10
local out = num .. " times table<br />"
for i = 1, 10 do
out = out .. i .. " times " .. num .. " is " .. i * num .. "<br>"
end
return out
end
return p