You can probably read all the content of the courses on your phone and even run a basic Python/R interpreter on it, but no. Phone keyboards suck for programming and there are a ton of programs you can't run on a phone (like RStudio or Python IDEs).
Just get a cheap desktop and keyboard on Craigslist. I've found ones for as little as 20USD. Or you might be able to use a Raspberry Pi, if you're into that.