Module:Sandbox/TheAmazingness

-- TheAmazingness Google Code-in, Introduction to Lua in Wikipedia

-- Lua Task 2: Working with Modules

local p = {}

function p.hello( frame ) return "Hello, world!" end

p.Hi = function(frame) strName = frame.args.name or "Jimbo" return "Hello from Lua to my friend " .. strName .. ". " end

function p.temperature(frame) cel = frame.args.celsius or 0 fah = cel * 9 / 5 + 32 return cel .. "°C is " .. fah .. "°F." end

return p