[Tutor] looking for a Python feature for computer teaching
alan.gauld at btinternet.com
Mon Dec 15 01:10:13 CET 2014
On 14/12/14 19:29, Pi Po wrote:
> Want each interpreted line of code to introduce as a cells on
> a spreadsheet window each new variable (or array) with its initialized
> and show the updated contents of each previously defined variable (or
I don;t know of any environment for any language that does it
in a spreadsheet.
The nearest thing is a debugger with a watch point set.
You can use IDLE or Pythonwin or Eclipse or winpdb;
they all support watch points.
> As a student types in a line of code they will see how that
> line impacts old data and introduces new data.
Again that's not how the debugger approach works it takes a full program
and steps through it showing how the variables get updated, but they
don't allow dynamic typing of code during debugging.
At least none that I've seen. Some allow minor edits to
live code, but even that's fairly unusual.
> This can now be done manually on a blackboard but is slow and tedious.
Yes, but is very good discipline for students. Its how most
programmers learn, and something I still do regularly
when debugging a problem(on paper not a blackboard!)
> If anyone knows another language (assembler, forth, C, J, ...) which
> already has this feature, appreciate a link.
> But as syntax of Python is relatively clean and suited for instruction,
> much prefer something in Python.
Nope, I don't know of anything like that. Smalltalk might
come closest with its Workspace concept and object browser.
But it's certainly not a spreadsheet, although it does allow
you to type and evaluate new lines of code as you go.
The Squeak environment is designed for education use so
might be worth a look.
You could also try asking on the edu-sig mailing list
which is for educators using Python (I haven't checked in
there for years so I hope its still running!)
Author of the Learn to Program web site
Follow my photo-blog on Flickr at:
More information about the Tutor