Though I like the Raspberry Pi idea and think your grandkids might have a great time playing with it, and easier (and less expensive!) solution is to get each of them registered for a Wolfram account/ID and get them using the Wolfram Developer Platform under the free account option. This gives them access to a cloud-based machine that does (nearly) everything the desktop version of Mathematica will do. And did I mention its FREE?