This idea is quite handy. With a raspberry pi or eqvivalent single board computer you could run octave and python on the phone.
With python and octave on the phone and a bluetooth keyboard you could do several online courses.
To install the octave-kernel in jupyter do the following on the raspberry pi
(sudo infront of apt and pip)
pip install octave_kernel
python -m octave_kernel.install
If octave plot dont work you you need:
apt install gnuplot
apt install ghostscript
An idea would be if there was a service like gmail but you got access to a virtual Linux computer. Then with only your browser on the phone or windows pc you could play around with Linux and installl python modules and learn to program.