Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 47 lines (45 sloc) 1.657 kb
d4e52bd @jeresig I got something to draw! A chart is showing up now, rendering content…
jeresig authored
1 <!DOCTYPE html>
2 <html data-require="math graph">
3 <head>
4 <title>Limits 1</title>
5 <script src="../khan-exercise.js"></script>
6 </head>
190610b @jeresig Retool framework, move Math and Graph logic out of khan-exercise.js a…
jeresig authored
7 <body>
8 <div class="exercise">
9 <div class="vars">
10 <var id="q_lcoef">nonZeroRandomInt(-3, 3)</var>
11 <var id="edge">floor(sqrt(abs(10 / q_lcoef)))</var>
12 <var id="l_cons">nonZeroRandomInt(-1 * edge, edge)</var>
13 <var id="quadratic">q_lcoef + 'x^2'</var>
14 <var id="line">cleanMath('(x + ' + l_cons + ')')</var>
15 <var id="curFunc">function(x) {
16 return truncate_to_max(q_lcoef * Math.pow(x, 2), 4);
17 }</var>
18 <var id="a">-1 * l_cons</var>
19 <var id="limtoa">curFunc(a)</var>
20 <var id="l_limtoa">limtoa</var>
21 <var id="r_limtoa">limtoa</var>
22 </div>
23
24 <div class="problems">
25 <div id="original">
26 <p><code>\lim_{x\to<var>a</var>} \dfrac{<var>quadratic</var><var>line</var>}{<var>line</var>} = ?</code></p>
27 <div class="graph" style="width: 400px; height: 400px; font-size: 15px; font-family: sans-serif; font-style: bold; stroke: blue;" data-graph-type="plane">
9c227ad @jeresig Refine the definition of graphs, implement a basic API. Fixes #5.
jeresig authored
28 plot('(' + quadratic + line + ')/' + line);
29 ASdot([a, limtoa], 4, "black", "white");
30 </div>
190610b @jeresig Retool framework, move Math and Graph logic out of khan-exercise.js a…
jeresig authored
31 <p class="solution"><code><var>limtoa</var></code></p>
32 <ul class="choices" data-show="5" data-none="true">
33 <li><code>0</code></li>
34 <li><code><var>nonZeroRandomInt(-3, 3)</var></code></li>
35 <li><code><var>nonZeroRandomInt(-3, 3)</var></code></li>
36 <li><code><var>q_lcoef</var></code></li>
37 <li><code><var>l_cons</var></code></li>
38 <li><code><var>curFunc(0)</var></code></li>
39 <li>Does not exist.</li>
40 </ul>
d4e52bd @jeresig I got something to draw! A chart is showing up now, rendering content…
jeresig authored
41 </div>
42 </div>
190610b @jeresig Retool framework, move Math and Graph logic out of khan-exercise.js a…
jeresig authored
43
44 <div class="hints"></div>
d4e52bd @jeresig I got something to draw! A chart is showing up now, rendering content…
jeresig authored
45 </div>
46 </body>
47 </html>
Something went wrong with that request. Please try again.