See Python Run - Free Visualization Tool
See Python Run - Free Visualization Tool
Written by Mike James   
Friday, 21 September 2012

Making the connection between the text of a program and what it does is the key to learning to program. A new Python based tool makes this much easier as it actually shows you what the program's inner workings are doing as it runs.

When you first learn to program you have to master the art of seeing what your program does to the contents of the variables you have declared. It gets even more difficult when you are working with references to storage.  After a while it becomes second nature and you even manage to forget that it has any difficulty at all - doesn't everyone do this? The simple answer is no and if you want to teach a beginner how to program be prepared to explain the same ideas more than once until they get it.

The Online Python Tutor is a huge help in seeing what a program does. You can type in a Python program straight into a browser and run it at once. As you step though it an illustration shows what is stored in each location and the variables that reference the location. It handles all sorts of difficult cases including recursion. You can single step and if you want an "action movie" approach you can drag a slider as if the program was a video to move through it at speed.

 

Click to enlarge

pythontutorsmall

 

As the author, Philip Guo, says:

"Online Python Tutor is a free educational tool that helps students overcome a fundamental barrier to learning programming: understanding what happens as the computer executes each line of a program's source code. Using this tool, a teacher or student can write a Python program directly in the web browser and visualize what the computer is doing step-by-step as it executes the program."

You need to try it to see how good it is.

It has already been used in a number of online text books and all you have to do to embed an animation of a program into a web page is to include a line of JavaScript - although at the moment the documentation doesn't tell you how to do this. You can also share your work using a generated URL.

The really good news is that it is open sourced and you can play with the code to improve or modify what the program does. It is built using Python and JavaScript and only needs a CGI capable web server (or Google App Engine) to install.

There are plans to add a complete online authoring environment which would allow you to created animations plus annotations and complete lessons.

Visit the site and try it out.

 pythontutorvariables

 

 

 
 



Comments




or email your comment to: comments@i-programmer.info

 

To be informed about new articles on I Programmer, install the I Programmer Toolbar, subscribe to the RSS feed, follow us on, Twitter, Facebook, Google+ or Linkedin,  or sign up for our weekly newsletter.

 

Banner


HHVM 3.25 Defaults To PHP7
28/03/2018

Developers from Facebook have released a new version of HHVM, the Hip Hop Virtual Machine. The PHP support in new release has been changed to default to PHP 7 rather than the PHP 5 of the previous ver [ ... ]



Mozilla Makes WebAssembly For The Rest Of Us
16/04/2018

WebAssembly - it's the next big thing. Until now the problem has been that you had to be dedicated, to say the least, to get involved. Now Mozilla has a way that we can all try it out  with WebAs [ ... ]


More News

Last Updated ( Friday, 21 September 2012 )
 
 

   
Banner
RSS feed of news items only
I Programmer News
Copyright © 2018 i-programmer.info. All Rights Reserved.
Joomla! is Free Software released under the GNU/GPL License.