imported>Nicolas NALLET
No edit summary
 
(No difference)

Latest revision as of 15:30, 14 August 2019

Documentation for this module may be created at Module:Sandbox/Nicolas NALLET/doc

--this is a comment
--task2

p = {}

function p.UneFonction(frame)
	return "Bonjour le monde !"
end

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

function p.temperature(frame)
	cel = tonumber(frame.args.celsius or 0)
	fah = cel * 9 / 5 + 32
	if cel > 10 then
		msg = " warm"
	else
		msg = " cold"
	end
	return "The temperature in fahrenheit is " .. fah.. 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 .. " times " .. num .. " is ".. i * num .. "<br>"
	end
	return out
end
return p