Now, Jupyter is great (I'm a statistician btw) precisely because you have a presentable literate programming tool. That is extremely valuable for data analysis and model building.
Now, If you are teaching programming in it self, I think the terminal + text editor is important since that is a step towards how things are done irl. But if you think that the terminal is too much for your audience, just go for IDLE, which has many advantages for python development + teaching, and is already a step towards text editor + terminal or IDE level development.
Jupyter (and similar) Notebooks are a way things are done "in real life"; they aren't just for entertainment purposes; and JupyterLab blends that into an IDE and the IDE with notebooks approach is also a way things have been done "in real life"; both with third-party tools incorporating Jupyter (and earlier IPython) notebooks, and with other IDE's incorporating notebook-style interaction.
Which isn't to say that there aren't arguments for teaching program outside of the notebook environment rather than within it (though the notebook is kind of a super REPL, and REPLs seem to me to be great tools for teaching), but that not using notebooks is better because it is how things are done "in real life" is just taking a highly selective view of real life.
You can just "pip install jupyterlab" on a Raspberry Pi and it works great!
Although I'm new to Jupyter Lab, I just tried it and it does feel like it could be a very approachable IDE for educational use.
Can't find it on CODE.org any more, it's mentioned here http://www.gameinformer.com/b/news/archive/2017/11/10/little....
To do it more properly, however, you can have a post_save_hook for the whole notebook, which runs the code from whichever cells however often you want outside of the notebooks. Of course, this way you wont see the output in the notebook.
for ship in myShip.radarScan():
if ship.is_enemy:
display([ship.type, ship.range, ship.bearing])
And then have that cells results always showing the current data as they play the game.https://jupyter-contrib-nbextensions.readthedocs.io/en/lates...
display handles that you can update from elsewhere in the notebook might be of interest. Here's an example:
https://github.com/ipython/ipython/blob/master/examples/IPyt...
I don't think you mean this, though it could be intriguing just as well..
schedule = set() # (time, function) pairs
while True:
next=min(schedule)
schedule.remove(next)
sleep(next[0] - now())
next[1]()
schedule.add((now() + interval, next[1]))
[1] Pseudocode only; I don't have the API reference in front of me to verify method names and such. Several edge cases are unhandled.Don't. Use something that will engage them visually and mentally. Kids are not impressed with text, that ship has sailed.
What I'd really like to do is make a multiplayer naval game, with each player controlling their ship from their own notebook. Players would start out by running commands like fire(range=400, bearing=120) right from a cell, but would later be able automate their ship - for example, pick the nearest enemy, get the range, and plug that into firing automatically at it.
My server would be projecting a big map of the world up on the wall.
However, to do this nicely, I need the ability to make a cell (or a function defined in a cell) run every X milliseconds. I know I can do this for one cell, with a loop and sleep function, but I'd really rather have multiple cells/functions "running", so we can break the code into smaller chunks, and to let them build their own ship UIs.
Any advice on how to do this in Juptyer with Python? In an ideal world, I'd just "tag" a cell somehow so that it ran periodically.