Prerequisite: Lua Task 5 - Calculations. This task requires independent learning and is more difficult.
Note that a Scribunto function always returns a string (i.e. text) to the Wikipedia page where it is invoked. Lua variables are dynamically-typed. That means that variables do not have a type, only values have a type. Lua will generally do its best to convert from one type to another as needed. For example, you can concatenate text with numbers without having to explicitly convert the number to a string first.
Lua uses the if <test> then <do-if-true> else <do-if-false> end structure to pick one of two outcomes depending on whether the test turns out true or false.
1 In your module sandbox, amend the function "temperature" to supply 0 as the default if no parameter is supplied. Save it.
2 Write a line in your sandbox to test that. Save it.
3 Make changes to the function "temperature" to store the text that you are returning in a variable called "msg". Then return msg as the last line before the end of the function. Save it and check in your sandbox that it is still working.
4 Change function "temperature" to test whether the value of "cel" is greater than (>) 9. If it is, then add " It is warm." to "msg", otherwise add " It is cold." - you'll need the concatenation operator (..) and a construction like msg = msg .. " blah blah".
5 Test your function in your sandbox with different values of the parameter to make sure that the test works as expected.