imported>Estevoaei No edit summary |
(No difference)
|
Latest revision as of 15:27, 14 August 2019
Documentation for this module may be created at Module:Sandbox/Estevoaei/doc
--this is a comment
--task2
p = {}
function p.CleverName(frame)
return "Hello Wold."
end
p.Hi = function(frame)
anyName = frame.args.name or "Vladimir Putin"
return "Hello from Lua to my friend " .. anyName .. ".<br>"
end
function p.temperature(frame)
cel = tonumber(frame.args.celsius or 0)
fah = cel * 9 / 5 + 32
if cel > 10 then
msg = ". It is warm."
else
msg = ". It is not warm!"
end
return "The temperature is " .. fah .. "F" .. msg
end
p.times = function(frame)
local num = tonumber( frame.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