2.3. Codelens in Python

The codelens feature allows the learner to step through Python code using the Python Visualizer from Philip Guo and see the values of the variables change as the code executes.

The following example in Python is from the Student Computer Science Principles. You can see the following example by click on the following link Codelens-Python.


2.4. Codelens with Questions

You can embed questions in a Python codelens so that the leaner is asked a question before a particular line executes.


2.5. Codelens in Java

Currently we can not easily embed the Java Visualizer in an ebook. We can embed a link to the Java Visualizer that has the code preloaded.

The following example is from the Java Review ebook. Click on the following link to step through the example Arrays-in-Java.

Next Section - 2.6. Visualizing how Python Evaluates Expressions