forked from hcientist/OnlinePythonTutor
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathembedding-demo.html
More file actions
68 lines (47 loc) · 2.45 KB
/
embedding-demo.html
File metadata and controls
68 lines (47 loc) · 2.45 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
<!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">
<head>
<title>Online Python Tutor embedding demo</title>
<!-- dependencies 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.simplemodal.js"></script> <!-- for questions -->
<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.8.24.custom.min.js"></script> <!-- for sliders and other UI elements -->
<link type="text/css" href="css/ui-lightness/jquery-ui-1.8.24.custom.css" rel="stylesheet" />
<link type="text/css" href="css/basic.css" rel="stylesheet" />
<!-- Python Tutor frontend code and styles -->
<script type="text/javascript" src="js/pytutor.js"></script>
<link rel="stylesheet" href="css/pytutor.css"/>
<!-- This JavaScript file contains the demo code - READ IT!!!
(Include this file AFTER all of its dependencies.)
-->
<script type="text/javascript" src="embedding-demo.js"></script>
</head>
<body>
<!-- This demo shows three visualizations, each embedded within a div ... -->
<p>Recursive list sum (from <a href="http://pythontutor.com">pythontutor.com</a> home page):</p>
<div id="listSumDiv"></div>
<p>Towers of Hanoi:</p>
<div id="hanoiDiv"></div>
<p>Happy Birthday:</p>
<div id="happyDiv"></div>
<!-- popup question dialog code from Brad Miller -->
<p>This one tests your knowledge:</p>
<div id="bradsDiv"></div>
<div id="bradsDiv_modal" class="basic-modal-content">
<h3>Check your understanding</h3>
Enter the value of the variable a after the current line is executed.
<input id="basic-textbox" type="textbox" />
<button onclick="traceQCheckMe('basic-textbox','bradsDiv','globals.a')">Check
Me</button>
<button onclick="closeModal('bradsDiv')">Continue...</button>
<p id ="bradsDiv_feedbacktext" class="feedbacktext"></p>
</div>
<div style='display:none'>
<img src='css/x.png' alt='' />
</div>
</body>
</html>