Get live help for free in the Python tutoring Discord chat room Write code in Python 3.6 Python 2.7 Python 3.6 with Anaconda (experimental) Java 8 C (gcc 4.8, C11) C++ (gcc 4.8, C++11) JavaScript ES6 TypeScript 1.4 Ruby 2.2 Someone is typing ...
1XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX <p>
Visualize Execution
Live Programming Mode
</p> hide exited frames [default] show all frames (Python) inline primitives and try to nest objects inline primitives, don't nest objects [default] render all objects on the heap (Python/Java) draw pointers as arrows [default] use text labels for pointers <p>Create test cases</p>
<p>These examples demonstrate the tool's visualization capabilities but are <em>not</em> meant as coding lessons.</p>
<p>Python Examples</p>
<p>Basic: hello |
happy |
intro |
filter |
tokenize |
insertion sort |
for-else |
user input
</p>
<p>Math:
factorial |
fibonacci |
memoized fibonacci |
square root |
gcd |
towers of hanoi
</p>
<p>Objects: OOP 1 |
OOP 2 |
OOP 3 |
inheritance </p>
<p>Linked Lists:
LL 1 |
LL 2 |
LL sum
</p>
<p>Pointer Aliasing:<br>
aliasing1 |
aliasing2 |
aliasing3 |
aliasing4 |
aliasing5 |
aliasing6 |
aliasing7 |
aliasing8 |
sumList
</p>
<p>Higher-Order Functions:<br> closure1 |
closure2 |
closure3 |
closure4 |
closure5 |
list map |
summation |
lambda param </p>
<p>Advanced:<br>
list comp |
list/set/dict comp |
decorator |
generator |
genexpr |
varargs |
exception |
metaclass
</p>
<p>Python 3 only: student torture |
nonlocal
</p>
<p>Java Examples</p>
<p>
Basic:
Variables |
ControlFlow |
Sqrt |
ExecLimit |
Strings
</p>
<p>
Methods:
PassByValue |
Recursion |
StackOverflow
</p>
<p>
OOP:
Rolex |
Person |
Complex |
Casting
</p>
<p>
Data structures:
LinkedList |
StackQueue |
Postfix |
SymbolTable
</p>
<p>
Java features:
ToString |
Reflect |
Exception |
ExceptionFlow |
TwoClasses
</p>
<p>
Misc:
Forest |
Knapsack |
StaticInitializer |
Synthetic
</p>
<p>(All Java examples created by David Pritchard)</p>
<p>JavaScript Examples</p>
<p> factorial | data types | exception | closure | shadowing | constructor | inheritance
</p>
<p>TypeScript Examples</p>
<p> hello | classes | inheritance | generics
</p>
<p>Ruby Examples</p>
<p> Containers | Globals | Constants | Blocks | Block scoping | More block scoping </p>
<p>
</p> Proc &.
Lambda | Proc scoping | Proc return | Lambda scoping | Inheritance | Symbols <p>
</p> Protected &.
private | Class &.
instance vars | Toplevel defs | Megagreeter
<p>
</p>
<p>C Examples</p>
<p> Thesis | Globals | Structs | Nested structs | Array overflow | Array param </p>
<p>
</p> String reverse | Pointer levels | Pointer chain | Pointers wild | Typedef
<p>
</p>
<p>C++ Examples</p>
<p> Basic | Pass by ref | Class | Class pointer | Date class | Inheritance | Virtual method
</p>Show code examples <p>unsupported features
</p>
<p> Generate permanent link </p>
<p> Generate embed code (also supports https://)
</p>
<p>Privacy Policy: By using Python Tutor, your
visualized code, options, user interactions, and IP address
are logged on our server and may be analyzed for research purposes.
Nearly all web services collect this basic information from users in
their server logs.
However, Python Tutor does not collect any personally
identifiable information from its users.
It uses Google Analytics for
website analytics.</p>
<p>Terms of Service: The Python Tutor service is provided for free on an
as-is basis.
Use this service at your own risk.
Do not use it to share
confidential information.
The developers of Python Tutor are not
responsible for the actions of any of the users on
this website.
We are also not responsible for any damages caused by
using this website.
Finally, it is your responsibility to follow
appropriate academic integrity standards.</p>