|
--- |
|
widget: |
|
- text: "-- This function calculates the nth Fibonacci number iteratively. The Fibonacci sequence is a series\n |
|
-- of numbers where the next number is found by adding up the two numbers before it.\n |
|
-- For example, the sequence starting with 0 and 1 is: 0, 1, 1, 2, 3, 5, 8, 13, ....\n |
|
function fibonacci(n)\n |
|
local a, b = 0, 1\n |
|
for i = 1, n do\n |
|
a, b = b, a+b\n |
|
end\n |
|
return a\n |
|
end" |
|
example_title: "Good" |
|
- text: "def make_kill_chain_phase(kill_chain_name, phase_name):\n |
|
\"\"\"\n |
|
Makes a kill chain phase for a kill chain\n |
|
\"\"\"\n |
|
return {\n |
|
\"kill_chain_name\": kill_chain_name,\n |
|
\"phase_name\": phase_name\n |
|
}" |
|
example_title: "Meh" |
|
--- |
|
|