Jupyter Kernel: Functions cannot be called in following cells
If a variable is defined in cell 1, it can be used in the following cell.
Example:
cell 0: foobar = 3
, cell 1: print(foobar)
. This will work without any issue and output 3
.
However, if a function is defined in cell 0, it cannot be called in cell 1.
Examples:
cell 0: some_function(x)=2*x; print(some_function(10))
--> works without problem and outputs 20
.
cell 0: some_function(x)=2*x
, cell 1: print(some_function(10))
--> No output at all.