|
| 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 | +
|
| 6 | +Online Python Tutor |
| 7 | +Copyright (C) 2010 Philip J. Guo (philip@pgbovine.net) |
| 8 | +https://github.com/pgbovine/OnlinePythonTutor/ |
| 9 | +
|
| 10 | +This program is free software: you can redistribute it and/or modify |
| 11 | +it under the terms of the GNU General Public License as published by |
| 12 | +the Free Software Foundation, either version 3 of the License, or |
| 13 | +(at your option) any later version. |
| 14 | +
|
| 15 | +This program is distributed in the hope that it will be useful, |
| 16 | +but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 17 | +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 18 | +GNU General Public License for more details. |
| 19 | +
|
| 20 | +You should have received a copy of the GNU General Public License |
| 21 | +along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 22 | +
|
| 23 | + --> |
| 24 | + |
| 25 | + |
| 26 | +<head> |
| 27 | + <title>Online Python Tutor: [TEST INTERFACE FOR PRACTICE PROBLEMS]</title> |
| 28 | + |
| 29 | +<!-- jQuery 1.6.0 --> |
| 30 | + |
| 31 | +<!-- local version for offline testing --> |
| 32 | +<script type="text/javascript" src="jquery.min.js"></script> |
| 33 | + |
| 34 | +<!-- online version hosted by Google --> |
| 35 | +<!-- |
| 36 | + <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.0/jquery.min.js"></script> |
| 37 | + --> |
| 38 | + |
| 39 | + |
| 40 | +<script type="text/javascript" src="jquery.textarea.js"></script> |
| 41 | + |
| 42 | +<!-- jsPlumb library for rendering connectors --> |
| 43 | +<script type="text/javascript" src="jquery.jsPlumb-1.3.3-all-min.js "></script> |
| 44 | + |
| 45 | +<!-- my own code --> |
| 46 | +<script type="text/javascript" src="edu-python.js"></script> |
| 47 | +<script type="text/javascript" src="edu-python-questions.js"></script> |
| 48 | + |
| 49 | +<link rel="stylesheet" href="edu-python.css" type="text/css"/> |
| 50 | +<link rel="stylesheet" href="edu-python-questions.css" type="text/css"/> |
| 51 | + |
| 52 | +</head> |
| 53 | + |
| 54 | +<body> |
| 55 | + |
| 56 | + |
| 57 | +<div id="questionsHeaderPane"> |
| 58 | + |
| 59 | +<div id="ProblemStatement"><b>Problem</b>: Write a function that |
| 60 | +reverses a list in-place.</div> |
| 61 | + |
| 62 | +<div id="HintStatement"><a href="#" id="showHintHref">Show hint</a></div> |
| 63 | + |
| 64 | +<div id="SolutionStatement"><a href="#" id="showSolutionHref">Show solution</a></div> |
| 65 | + |
| 66 | +</div> |
| 67 | + |
| 68 | + |
| 69 | +<div id="pyInputPane"> |
| 70 | + |
| 71 | +<textarea id="pyInput" cols="55" rows="20" wrap="off"></textarea> |
| 72 | + |
| 73 | +<p/>Test code:<br/> |
| 74 | +<textarea id="pyInput" cols="55" rows="4" wrap="off"></textarea> |
| 75 | + |
| 76 | +<p> |
| 77 | + |
| 78 | +<button id="executeBtn" class="bigBtn" type="button">Visualize execution</button> |
| 79 | + |
| 80 | +</div> |
| 81 | + |
| 82 | + |
| 83 | +<table border="0" id="pyOutputPane"> |
| 84 | +<tr> |
| 85 | +<td valign="top"> |
| 86 | + |
| 87 | +<center> |
| 88 | + |
| 89 | +<div id="pyCodeOutputDiv"> |
| 90 | + |
| 91 | +Use left and right arrow keys to step through this code: |
| 92 | +<table id="pyCodeOutput"></table> |
| 93 | + |
| 94 | +</div> |
| 95 | + |
| 96 | +<div id="editCodeLinkDiv"> |
| 97 | + |
| 98 | +<button id="editBtn" class="medBtn" type="button">Edit code</button> |
| 99 | + |
| 100 | +</div> |
| 101 | + |
| 102 | +<div id="vcrControls"> |
| 103 | + <button id="jmpFirstInstr", type="button"><< First</button> |
| 104 | + <button id="jmpStepBack", type="button">< Back</button> |
| 105 | + <span id="curInstr">Step ? of ?</span> |
| 106 | + <button id="jmpStepFwd", type="button">Forward ></button> |
| 107 | + <button id="jmpLastInstr", type="button">Last >></button> |
| 108 | + |
| 109 | + <p><span id="warningOutput"></span></p> |
| 110 | +</div> |
| 111 | + |
| 112 | +<div id="errorOutput"></div> |
| 113 | + |
| 114 | + |
| 115 | +</center> |
| 116 | + |
| 117 | +Program output: |
| 118 | +<br/> |
| 119 | +<textarea id="pyStdout" cols="50" rows="13" wrap="off" readonly></textarea> |
| 120 | + |
| 121 | + |
| 122 | +</td> |
| 123 | +<td valign="top"> |
| 124 | + |
| 125 | +<div id="dataViz"></div> |
| 126 | + |
| 127 | +</td> |
| 128 | +</tr> |
| 129 | +</table> |
| 130 | + |
| 131 | +<center> |
| 132 | + |
| 133 | + |
| 134 | +<div id="footer"> |
| 135 | + |
| 136 | +<p/> |
| 137 | +This application supports the core <a |
| 138 | +href="http://www.python.org/doc/2.5/">Python 2.5</a> language, with no |
| 139 | +module imports or file I/O. It's meant to be used as a platform for |
| 140 | +creating programming tutorials, not for running or debugging |
| 141 | +production code. |
| 142 | + |
| 143 | +<p style="margin-top: 8px;"/>Official Python 3 support is coming soon; |
| 144 | +for now, try the <a |
| 145 | +href="http://netserv.ict.ru.ac.za/python3_viz/">Python 3 fork</a> by |
| 146 | +Peter Wentworth. |
| 147 | + |
| 148 | +<p style="margin-top: 8px;"/> |
| 149 | +Check out the <a |
| 150 | +href="https://github.com/pgbovine/OnlinePythonTutor/">GitHub</a> |
| 151 | +repository and send bug reports, feedback, and suggestions to philip@pgbovine.net |
| 152 | + |
| 153 | +<p style="margin-top: 8px;"/> |
| 154 | +Copyright © 2010-2011 <a href="http://www.stanford.edu/~pgbovine/">Philip J. Guo</a> |
| 155 | +</div> |
| 156 | + |
| 157 | +</center> |
| 158 | + |
| 159 | +</body> |
| 160 | +</html> |
| 161 | + |
0 commit comments