|
| 1 | +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| 2 | +<html xmlns="http://www.w3.org/1999/xhtml"> |
| 3 | + |
| 4 | +<!-- |
| 5 | + Python Tutor: https://github.com/pgbovine/OnlinePythonTutor/ |
| 6 | + Copyright (C) Philip Guo (philip@pgbovine.net) |
| 7 | + LICENSE: https://github.com/pgbovine/OnlinePythonTutor/blob/master/LICENSE.txt |
| 8 | +--> |
| 9 | + |
| 10 | +<head> |
| 11 | + |
| 12 | +<title>Python Tutor - Visualize Python, Java, JavaScript, TypeScript, Ruby, C, and C++ code execution</title> |
| 13 | + |
| 14 | +<meta http-equiv="Content-type" content="text/html; charset=UTF-8"/> |
| 15 | + |
| 16 | + <!-- let Webpack take care of everything --> |
| 17 | + <script type="text/javascript" src="build/index.bundle.js" charset="utf-8"></script> |
| 18 | + |
| 19 | +</head> |
| 20 | + |
| 21 | +<body> |
| 22 | + |
| 23 | + |
| 24 | +<div class="mainBodyPane"> |
| 25 | + |
| 26 | +<table class='layoutTbl'> |
| 27 | + <tr> |
| 28 | + <td> |
| 29 | + |
| 30 | +<div class="activityPane" id="learnPane"> |
| 31 | + |
| 32 | +<h1><span id="learnHeading">VISUALIZE</span> <span class="smallH1"> |
| 33 | +<a href="visualize.html#py=2">Python</a>, |
| 34 | +<a href="java.html">Java</a>, |
| 35 | +<a href="javascript.html">JavaScript</a>, |
| 36 | +<a href="typescript.html">TypeScript</a>, |
| 37 | +<a href="ruby.html">Ruby</a>, |
| 38 | +<a href="c.html">C</a>, |
| 39 | +and |
| 40 | +<a href="cpp.html">C++</a> |
| 41 | +programs |
| 42 | + |
| 43 | +</span></h1> |
| 44 | + |
| 45 | +<p><a id="optLink" href="visualize.html">Python Tutor</a>, created |
| 46 | +by <a |
| 47 | +href="http://www.pgbovine.net/">Philip Guo</a>, |
| 48 | +helps people overcome a fundamental |
| 49 | +barrier to learning programming: understanding what happens as the |
| 50 | +computer executes each line of a program's source code.</p> |
| 51 | + |
| 52 | + |
| 53 | +<p>Using this |
| 54 | +tool, you can write <b><a href="visualize.html#py=2">Python</a></b>, |
| 55 | +<a href="java.html"><b>Java</b></a>, |
| 56 | +<a href="javascript.html"><b>JavaScript</b></a>, |
| 57 | +<a href="typescript.html"><b>TypeScript</b></a>, |
| 58 | +<a href="ruby.html"><b>Ruby</b></a>, |
| 59 | +<a href="c.html"><b>C</b></a>, |
| 60 | +and |
| 61 | +<a href="cpp.html"><b>C++</b></a> |
| 62 | +programs in your Web |
| 63 | +browser and visualize what the computer is doing step-by-step as it executes those programs. |
| 64 | + |
| 65 | +So far, over <b>1.5 million people in over 180 countries</b> have used |
| 66 | +Python Tutor to visualize over 15 million pieces of code, often as a |
| 67 | +supplement to textbooks, lecture notes, and online programming |
| 68 | +tutorials.</p> |
| 69 | + |
| 70 | +<div id="startLink"> |
| 71 | + <a href="visualize.html">Start visualizing your code now</a> |
| 72 | + (or try <a href="live.html">live programming</a>) |
| 73 | +</div> |
| 74 | + |
| 75 | + |
| 76 | +<p>For example, here is a visualization showing a Python program that <a |
| 77 | +href="http://en.wikipedia.org/wiki/Recursion_(computer_science)">recursively</a> |
| 78 | +finds the sum of a linked list:</p> |
| 79 | + |
| 80 | +<div id="demoViz"></div> |
| 81 | + |
| 82 | +<p> |
| 83 | +<b><a |
| 84 | +href="http://pgbovine.net/publications/Online-Python-Tutor-web-based-program-visualization_SIGCSE-2013.pdf">Read</a></b> |
| 85 | +the research paper – Philip J. Guo. Online Python Tutor: Embeddable |
| 86 | +Web-Based Program Visualization for CS Education. In <i>Proceedings |
| 87 | +of the ACM Technical Symposium on Computer Science Education |
| 88 | +(SIGCSE)</i>, March 2013. [<a |
| 89 | +href="http://pgbovine.net/publications/Online-Python-Tutor-web-based-program-visualization_SIGCSE-2013.txt">BibTeX</a>] |
| 90 | +</p> |
| 91 | + |
| 92 | + |
| 93 | +</div> |
| 94 | + |
| 95 | + </td> |
| 96 | + </tr> |
| 97 | +</table> |
| 98 | + |
| 99 | +<table class='layoutTbl'> |
| 100 | + <tr> |
| 101 | + <td id="embedPaneTd"> |
| 102 | + |
| 103 | +<div class="activityPane" id="embedPane"> |
| 104 | + |
| 105 | +<h1><span id="embedHeading">SHARE</span> <span class="smallH1">live visualization sessions</span></h1> |
| 106 | + |
| 107 | +<p>Click the “Start shared session” button to allow an instructor or friend |
| 108 | + to join your session. You can chat about your code and navigate |
| 109 | + the visualization together to get live, real-time tutoring. Watch this one-minute |
| 110 | + <a href="http://youtu.be/Z2TIjNArOK4">video demo</a>: |
| 111 | +</p> |
| 112 | + |
| 113 | +<iframe width="480" height="360" src="http://www.youtube.com/embed/Z2TIjNArOK4" frameborder="0" allowfullscreen></iframe> |
| 114 | + |
| 115 | +<p>Also, you can click the “Generate |
| 116 | +permanent link” button (at the bottom of <a href="visualize.html">this |
| 117 | +page</a>) and paste that link in an email, social networking |
| 118 | +post, or forum question. When recipients click on your link, they will |
| 119 | +see the exact visualization you've created.</p> |
| 120 | + |
| 121 | +<p>For example, clicking <a |
| 122 | +href="visualize.html#code=%23+find+primes+using+a+for-else+construct%0Afor+n+in+range(2,+10)%3A%0A++++x_range+%3D+range(2,+n)%0A++++for+x+in+x_range%3A%0A++++++++if+n+%25+x+%3D%3D+0%3A%0A++++++++++++break%0A++++else%3A%0A++++++++%23+loop+fell+through+without+finding+a+factor%0A++++++++print(n)&mode=display&cumulative=false&py=2&curInstr=43">this |
| 123 | +link</a> brings you directly to step 44 of 57 in a program that finds |
| 124 | +prime numbers using the Python <tt>for-else</tt> construct.</p> |
| 125 | + |
| 126 | +</div> |
| 127 | + |
| 128 | + </td> |
| 129 | + <td id="sharePaneTd"> |
| 130 | + |
| 131 | +<div class="activityPane" id="sharePane"> |
| 132 | + |
| 133 | +<h1><span id="shareHeading">EMBED</span> <span class="smallH1"> in any Web page</span></h1> |
| 134 | + |
| 135 | +<p>Using a single line of JavaScript code, you can <a |
| 136 | +href="https://github.com/pgbovine/OnlinePythonTutor/blob/master/v3/docs/embedding-HOWTO.md">embed</a> a Python Tutor |
| 137 | +visualization within any Web page (as shown in the “Learn” |
| 138 | +box above). The screenshot below shows a visualization |
| 139 | +embedded within the online textbook for the introductory CS course at UC |
| 140 | +Berkeley (<a href="http://www.composingprograms.com/">CS61A</a>): |
| 141 | + |
| 142 | +</p> |
| 143 | + |
| 144 | +<a href="http://www.composingprograms.com/"> |
| 145 | +<img id="cp-thumbnail" style="width: 275px; border: 1px solid #aaa; margin-bottom: 10px;"/> |
| 146 | +</a> |
| 147 | + |
| 148 | +</div> |
| 149 | + |
| 150 | + |
| 151 | +<div class="activityPane" id="detailsPane"> |
| 152 | + |
| 153 | +<p> |
| 154 | +Details: |
| 155 | +<ul> |
| 156 | + |
| 157 | + <li/>Free, open-source BSD-licensed code on <a |
| 158 | + href="https://github.com/pgbovine/OnlinePythonTutor/">GitHub</a> |
| 159 | + |
| 160 | + <li/>View the <a |
| 161 | + href="https://github.com/pgbovine/OnlinePythonTutor/tree/master/v3/docs">project |
| 162 | + documentation</a> online. |
| 163 | + |
| 164 | + <li/>Main technologies: Python, CGI, Node.js, and Docker for |
| 165 | + run-time tracing backends; HTML/CSS/JavaScript with <a |
| 166 | + href="http://www.jquery.org">jQuery</a>, <a |
| 167 | + href="http://www.d3js.org/">D3.js</a>, <a |
| 168 | + href="http://www.jsplumb.org/">jsPlumb</a>, |
| 169 | + <a href="https://togetherjs.com/">TogetherJS</a>, |
| 170 | + and <a |
| 171 | + href="http://ace.c9.io/">Ace</a> for the frontend |
| 172 | + |
| 173 | +</ul> |
| 174 | +</p> |
| 175 | + |
| 176 | +</div> |
| 177 | + |
| 178 | + </td> |
| 179 | + |
| 180 | + </tr> |
| 181 | +</table> |
| 182 | + |
| 183 | +</div> |
| 184 | + |
| 185 | + |
| 186 | +<div id="footer"> |
| 187 | + |
| 188 | +<p>Copyright © <a href="http://www.pgbovine.net/">Philip Guo</a>. All rights reserved.</p> |
| 189 | + |
| 190 | +</div> |
| 191 | + |
| 192 | + |
| 193 | +</body> |
| 194 | +</html> |
0 commit comments