2. A workaround in SageMathCloud is to (a) put your code in a file, e.g., mycode.m, then (b) load that file in a worksheet by typing sh('octave mycode.m'). Here's a working example: