I have a block of code like the following:
ret = 0
for k = 1:10
ret += k
end
ret
Literate won't let me make a notebook unless I add global ret inside the for-loop. Even though the final Jupyter notebook is happy without the global ret.
Since this is the very first notebook in an introductory course I don't really want to talk about scoping, especially when I only need it to compile the file.
I have a block of code like the following:
Literate won't let me make a notebook unless I add
global retinside the for-loop. Even though the final Jupyter notebook is happy without theglobal ret.Since this is the very first notebook in an introductory course I don't really want to talk about scoping, especially when I only need it to compile the file.