forked from hcientist/OnlinePythonTutor
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
196 lines (138 loc) · 6.01 KB
/
index.html
File metadata and controls
196 lines (138 loc) · 6.01 KB
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
<!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">
<!--
Python Tutor: https://github.com/pgbovine/OnlinePythonTutor/
Copyright (C) Philip Guo (philip@pgbovine.net)
LICENSE: https://github.com/pgbovine/OnlinePythonTutor/blob/master/LICENSE.txt
-->
<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"/>
<!-- let Webpack take care of everything -->
<script type="text/javascript" src="build/index.bundle.js?ce5a3e2f8b" charset="utf-8"></script>
<!-- insert google-analytics.txt contents here -->
</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>2.5 million people in over 180 countries</b> have used
Python Tutor to visualize over 20 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>
<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 id="cp-thumbnail" 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>
</div>
</td>
</tr>
</table>
</div>
<div id="footer">
<p>Copyright © <a href="http://www.pgbovine.net/">Philip Guo</a>. All rights reserved.</p>
</div>
</body>
</html>