Take a look at Jupyter

If I was still teaching a programming course (those were the days) I’d be taking a very long, hard, look at Jupyter. It’s a web based active notebook where the pages can contain text, images, programs and outputs from programs. You can write your code into blocks on the page, hit run and see the output. And you do this inside your browser.

I’ve had a go with Python and JavaScript and they just work. You can also use C# as well. It would make it possible to create an interactive text book which contained code and output that readers could play with in the text. You can also use it to create interactive labs in other things too. We’re working on some curriculum for experiments with particle sensors and I’m going to take a look at how we could use Jupyter to do this.