Find file
Fetching contributors…
Cannot retrieve contributors at this time
216 lines (140 sloc) 5.25 KB
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">
Online Python Tutor
Copyright (C) 2010-2011 Philip J. Guo (
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <>.
<title>Online Python Tutor: Practice Questions</title>
<!-- jQuery 1.6.0 -->
<!-- local version for offline testing -->
<script type="text/javascript" src="jquery.min.js"></script>
<!-- online version hosted by Google -->
<script type="text/javascript" src=""></script>
<script type="text/javascript" src="hunt-mcilroy.js"></script>
<script type="text/javascript" src=""></script>
<script type="text/javascript" src="jquery.textarea.js"></script>
<!-- jsPlumb library for rendering connectors -->
<script type="text/javascript" src="jquery.jsPlumb-1.3.3-all-min.js "></script>
<!-- my own code -->
<script type="text/javascript" src="edu-python.js"></script>
<script type="text/javascript" src="edu-python-questions.js"></script>
<link rel="stylesheet" href="edu-python.css" type="text/css"/>
<div id="questionsHeaderPane">
<div class="questionsHeaderTitle" id="ProblemName">Please load a question ...</div>
<div class="questionsHeaderStmt" id="ProblemStatement"></div>
<div class="questionsHeaderStmt" id="HintStatement"><a href="#" id="showHintHref">Show hint</a></div>
<div class="questionsHeaderStmt" id="SolutionStatement"><a href="#" id="showSolutionHref">Show solution</a></div>
<div id="pyInputPane">
<p/>Write your solution code here:<br/>
<textarea class="codeInputPane" id="actualCodeInput" cols="60" rows="15" wrap="off">
<p/>Write your test code here:<br/>
<textarea class="codeInputPane" id="testCodeInput" cols="60" rows="3" wrap="off">
<button id="executeBtn" class="bigBtn" type="button">Visualize execution</button>
<table border="0" id="pyOutputPane">
<td valign="top">
<div id="pyCodeOutputDiv">
Use <b>left</b> and <b>right</b> arrow keys to step through this code:
<table id="pyCodeOutput"></table>
<div id="editCodeLinkDiv">
<button id="editBtn" class="medBtn" type="button">Edit code</button>
<span style="margin-left: 7px;"/>
<button id="submitBtn" class="medBtn" type="button">Submit answer</button>
<div id="vcrControls">
<button id="jmpFirstInstr", type="button">&lt;&lt; First</button>
<button id="jmpStepBack", type="button">&lt; Back</button>
<span id="curInstr">Step ? of ?</span>
<button id="jmpStepFwd", type="button">Forward &gt;</button>
<button id="jmpLastInstr", type="button">Last &gt;&gt;</button>
<div id="errorOutput"></div>
Program output:
<textarea id="pyStdout" cols="50" rows="13" wrap="off" readonly></textarea>
<td valign="top">
<div id="dataViz"></div>
<div id="pyGradingPane">
<div id="submittedSolutionDisplay">
<pre id="submittedCodePRE"></pre>
<div id="gradeSummary"></div>
<table id="gradeMatrix">
<td class="statusCell">Status</td>
<tbody id="gradeMatrixTbody">
<div id="footer">
<input type="checkbox" id="classicModeCheckbox"/> Use low-bandwidth mode (for older browsers)
<p><a href="tutor.html">Write Python code and visualize execution</a></p>
<a href="question.html?two-sum">Two-sum</a> |
<a href="question.html?reverse">Reverse list</a> |
<a href="question.html?remove-dups">Remove duplicate chars</a>
<a href="question.html?debug-ireverse">In-place reverse</a> |
<a href="question.html?debug-bsearch">Binary search</a> |
<a href="question.html?debug-mergesort">Mergesort</a>
<a href="question.html?optimize-sum">Greatest sum</a> |
<a href="question.html?optimize-find-dups">Find duplicates</a> |
<a href="question.html?optimize-search">List search</a>
This application supports the core <a
href="">Python 2.5</a> language, with no
module imports or file I/O. It's meant to be used as a platform for
creating programming tutorials, not for running or debugging
production code.
<p style="margin-top: 8px;"/>
Check out the <a
repository and send bug reports, feedback, and suggestions to
<p style="margin-top: 8px;"/>
Copyright &copy; 2010-2011 <a href="">Philip Guo</a>. All rights reserved.