forked from hcientist/OnlinePythonTutor
-
Notifications
You must be signed in to change notification settings - Fork 5
/
index.html
283 lines (203 loc) · 9.21 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!--
Online Python Tutor
https://github.com/pgbovine/OnlinePythonTutor/
Copyright (C) Philip J. Guo ([email protected])
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-->
<head>
<title>Python Tutor - Visualize Python, Java, JavaScript, TypeScript, Ruby, C, and C++ code execution</title>
<meta http-equiv="Content-type" content="text/html; charset=UTF-8"/>
<!-- requirements for pytutor.js -->
<script type="text/javascript" src="js/d3.v2.min.js"></script>
<script type="text/javascript" src="js/jquery-1.8.2.min.js"></script>
<script type="text/javascript" src="js/jquery.ba-bbq.min.js"></script> <!-- for handling back button and URL hashes -->
<script type="text/javascript" src="js/jquery.jsPlumb-1.3.10-all-min.js "></script> <!-- for rendering SVG connectors
DO NOT UPGRADE ABOVE 1.3.10 OR ELSE BREAKAGE WILL OCCUR -->
<script type="text/javascript" src="js/jquery-ui-1.11.4/jquery-ui.min.js"></script> <!-- for sliders and other UI elements -->
<link type="text/css" href="js/jquery-ui-1.11.4/jquery-ui.css" rel="stylesheet" />
<script type="text/javascript" src="js/pytutor.js"></script>
<link rel="stylesheet" href="css/pytutor.css"/>
<script type="text/javascript" src="js/jquery.corner.js"></script>
<script type="text/javascript" src="js/index.js"></script>
<link rel="stylesheet" href="css/index.css"/>
</head>
<body>
<div class="mainBodyPane">
<table class='layoutTbl'>
<tr>
<td>
<div class="activityPane" id="learnPane">
<h1><span id="learnHeading">VISUALIZE</span> <span class="smallH1">
<a href="visualize.html#py=2">Python</a>,
<a href="java.html">Java</a>,
<a href="javascript.html">JavaScript</a>,
<a href="typescript.html">TypeScript</a>,
<a href="ruby.html">Ruby</a>,
<a href="c.html">C</a>,
and
<a href="cpp.html">C++</a>
programs
</span></h1>
<p><a id="optLink" href="visualize.html">Python Tutor</a>, created
by <a
href="http://www.pgbovine.net/">Philip Guo</a>,
helps people overcome a fundamental
barrier to learning programming: understanding what happens as the
computer executes each line of a program's source code.</p>
<p>Using this
tool, you can write <b><a href="visualize.html#py=2">Python</a></b>,
<a href="java.html"><b>Java</b></a>,
<a href="javascript.html"><b>JavaScript</b></a>,
<a href="typescript.html"><b>TypeScript</b></a>,
<a href="ruby.html"><b>Ruby</b></a>,
<a href="c.html"><b>C</b></a>,
and
<a href="cpp.html"><b>C++</b></a>
programs in your Web
browser and visualize what the computer is doing step-by-step as it executes those programs.
So far, over <b>1.5 million people in over 180 countries</b> have used
Python Tutor to visualize over 15 million pieces of code, often as a
supplement to textbooks, lecture notes, and online programming
tutorials.</p>
<div id="startLink">
<a href="visualize.html">Start visualizing your code now</a>
(or try <a href="live.html">live programming</a>)
</div>
<p>For example, here is a visualization showing a Python program that <a
href="http://en.wikipedia.org/wiki/Recursion_(computer_science)">recursively</a>
finds the sum of a linked list:</p>
<div id="demoViz"></div>
<!--
<p>
Watch a <a href="http://www.youtube.com/watch?v=y3sVN7uaxDM">1-minute
video demo</a> of visualizing execution in the <a
href="http://ipython.org/">IPython</a> shell in <a
href="https://github.com/pgbovine/OnlinePythonTutor/blob/master/v3/opt-ipy.py">interactive
mode</a>
</p>
-->
<p>
<b><a
href="http://pgbovine.net/publications/Online-Python-Tutor-web-based-program-visualization_SIGCSE-2013.pdf">Read</a></b>
the research paper – Philip J. Guo. Online Python Tutor: Embeddable
Web-Based Program Visualization for CS Education. In <i>Proceedings
of the ACM Technical Symposium on Computer Science Education
(SIGCSE)</i>, March 2013. [<a
href="http://pgbovine.net/publications/Online-Python-Tutor-web-based-program-visualization_SIGCSE-2013.txt">BibTeX</a>]
</p>
</div>
</td>
</tr>
</table>
<table class='layoutTbl'>
<tr>
<td id="embedPaneTd">
<div class="activityPane" id="embedPane">
<h1><span id="embedHeading">SHARE</span> <span class="smallH1">live visualization sessions</span></h1>
<p>Click the “Start shared session” button to allow an instructor or friend
to join your session. You can chat about your code and navigate
the visualization together to get live, real-time tutoring. Watch this one-minute
<a href="http://youtu.be/Z2TIjNArOK4">video demo</a>:
</p>
<iframe width="480" height="360" src="http://www.youtube.com/embed/Z2TIjNArOK4" frameborder="0" allowfullscreen></iframe>
<p>Also, you can click the “Generate
permanent link” button (at the bottom of <a href="visualize.html">this
page</a>) and paste that link in an email, social networking
post, or forum question. When recipients click on your link, they will
see the exact visualization you've created.</p>
<p>For example, clicking <a
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
link</a> brings you directly to step 44 of 57 in a program that finds
prime numbers using the Python <tt>for-else</tt> construct.</p>
</div>
</td>
<td id="sharePaneTd">
<div class="activityPane" id="sharePane">
<h1><span id="shareHeading">EMBED</span> <span class="smallH1"> in any Web page</span></h1>
<p>Using a single line of JavaScript code, you can <a
href="https://github.com/pgbovine/OnlinePythonTutor/blob/master/v3/docs/embedding-HOWTO.md">embed</a> a Python Tutor
visualization within any Web page (as shown in the “Learn”
box above). The screenshot below shows a visualization
embedded within the online textbook for the introductory CS course at UC
Berkeley (<a href="http://www.composingprograms.com/">CS61A</a>):
</p>
<a href="http://www.composingprograms.com/">
<img src="opt-v3-cs61a-embed-small.png" style="width: 275px; border: 1px solid #aaa; margin-bottom: 10px;"/>
</a>
</div>
<div class="activityPane" id="detailsPane">
<p>
Details:
<ul>
<li/>Free, open-source BSD-licensed code on <a
href="https://github.com/pgbovine/OnlinePythonTutor/">GitHub</a>
<li/>View the <a
href="https://github.com/pgbovine/OnlinePythonTutor/tree/master/v3/docs">project
documentation</a> online.
<li/>Main technologies: Python, CGI, Node.js, and Docker for
run-time tracing backends; HTML/CSS/JavaScript with <a
href="http://www.jquery.org">jQuery</a>, <a
href="http://www.d3js.org/">D3.js</a>, <a
href="http://www.jsplumb.org/">jsPlumb</a>,
<a href="https://togetherjs.com/">TogetherJS</a>,
and <a
href="http://ace.c9.io/">Ace</a> for the frontend
</ul>
</p>
<!--
<p>
Other Variants:
<ul>
<li/><a
href="http://cscircles.cemc.uwaterloo.ca/java_visualize/">Online Java
Tutor</a>, created by <a
href="http://www.cs.princeton.edu/~dp6/">David Pritchard</a>
<li/><a href="http://www.onlinerubytutor.com/">Online Ruby Tutor</a>,
created by <a href="http://www.danielstutzman.com/">Daniel
Stutzman</a>
<li/><a href="http://epleweb.appspot.com/">EPLE</a>, a mash-up of
Online Python Tutor and <a
href="https://code.google.com/p/blockly/">Blockly</a>, created by <a
href="https://piergiu.wordpress.com/">Pier Giuliano Nioi</a>
<li/>Integration into <a
href="https://github.com/pgbovine/OnlinePythonTutor/blob/master/v3/docs/opt-graphterm.md">GraphTerm</a>,
a project created by R. Saravanan
</ul>
</p>
-->
</div>
</td>
</tr>
</table>
</div>
<div id="footer">
<!--
<p>Join the <a
href="https://groups.google.com/forum/#!forum/pythontutor-users">pythontutor-users</a>
mailing list to participate in user discussions and <a
href="https://groups.google.com/forum/#!forum/pythontutor-announce">pythontutor-announce</a>
to receive occasional announcements.
<br/>
(Your name and email address will be kept private; only the list owner can see them.)</p>
-->
<p>Copyright © <a href="http://www.pgbovine.net/">Philip Guo</a>. All rights reserved.</p>
</div>
</body>
</html>