Skip to content
This repository has been archived by the owner on May 11, 2021. It is now read-only.

Removes multiple choice from radians_and_degrees.html exercise #11127

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
36 changes: 21 additions & 15 deletions exercises/degrees_to_radians.html
Expand Up @@ -13,29 +13,40 @@
<var id="NUM_RADIANS">roundTo( 2, toRadians(NUM_DEGREES) )</var> <var id="NUM_RADIANS">roundTo( 2, toRadians(NUM_DEGREES) )</var>


<!-- Common degree and radian values --> <!-- Common degree and radian values -->
<!-- (index rather than member-based selection is for wrong answer generation) --> <!-- (reformatted to include tau) -->
<var id="COMMON_INDEX">rand( commonAngles.length )</var> <var id="COMMON_INDEX">rand( commonAngles.length )</var>
<var id="COMMON_DEGREES">commonAngles[COMMON_INDEX].deg</var> <var id="COMMON_DEGREES">commonAngles[COMMON_INDEX].deg</var>
<var id="COMMON_RADIANS">commonAngles[COMMON_INDEX].rad</var> <var id="COMMON_RADIANS">commonAngles[COMMON_INDEX].rad</var>
<var id="COMMON_TAURADIANS">commonAngles[COMMON_INDEX].trad</var>
<var id="PIRADIANS">COMMON_DEGREES/ 180</var>
<var id="TAURADIANS">COMMON_DEGREES/ 360</var>
</div> </div>


<div class="problems"> <div class="problems">
<div id="degrees-to-radians"> <div id="degrees-to-radians">
<p class="question">Convert the angle <var>COMMON_DEGREES</var>&deg; into radians.</p> <p class="question">Convert the angle <var>COMMON_DEGREES</var>&deg; into radians. (Note that answer is in terms of <code>\pi</code>)</p>
<p class="solution"><code><var>COMMON_RADIANS</var></code></p> <div class="solution" data-type="multiple">
<span class="sol"> <var>PIRADIANS</var></span><code>\pi</code>
</div>


<div class="hints"> <div class="hints">
<p>To convert from degrees to radians, you multiply by <code>\pi</code> and then divide by <code>180^{\circ}</code>.</p> <p>To convert from degrees to radians, you multiply by <code>\pi</code> and then divide by <code>180^{\circ}</code>.</p>
<p><code><var>COMMON_DEGREES</var>^{\circ} \times \frac{\pi}{(180^{\circ})} = <var>COMMON_RADIANS</var></code></p> <p><code><var>COMMON_DEGREES</var>^{\circ} \times \frac{\pi}{(180^{\circ})} = <var>COMMON_RADIANS</var>= <var>PIRADIANS</var> \pi</code></p>
</div> </div>


<ul class="choices" data-show="4" data-none="true">
<li><code><var>wrongCommonAngle( COMMON_INDEX, 1 ).rad</var></code></li>
<li><code><var>wrongCommonAngle( COMMON_INDEX, 2 ).rad</var></code></li>
<li><code><var>wrongCommonAngle( COMMON_INDEX, 3 ).rad</var></code></li>
</ul>
</div> </div>
<div id="degrees-to-tau-radians">
<p class="question">Convert the angle <var>COMMON_DEGREES</var>&deg; into radians. (Note that answer is in terms of <code>\tau</code>, which equals <code>2\pi</code>)</p>
<div class="solution" data-type="multiple">
<span class="sol"> <var>TAURADIANS</var></span><code>\tau</code>
</div>


<div class="hints">
<p>To convert from degrees to radians, you multiply by <code>\tau</code> and then divide by <code>360^{\circ}</code>.</p>
<p><code><var>COMMON_DEGREES</var>^{\circ} \times \frac{\tau}{(360^{\circ})} = <var>COMMON_TAURADIANS</var> = <var>TAURADIANS</var> \tau</code></p>
</div>

</div>
<div data-type="degrees-to-radians"> <div data-type="degrees-to-radians">
<p class="question">Convert the angle <var>NUM_DEGREES</var>&deg; into radians. (Round to the nearest hundredth of a radian.)</p> <p class="question">Convert the angle <var>NUM_DEGREES</var>&deg; into radians. (Round to the nearest hundredth of a radian.)</p>
<p class="solution"><var>NUM_RADIANS.toFixed( 2 )</var></p> <p class="solution"><var>NUM_RADIANS.toFixed( 2 )</var></p>
Expand All @@ -45,11 +56,6 @@
<p><code><var>NUM_DEGREES</var>^{\circ} \times \frac{\pi}{180^{\circ}} = <var>NUM_RADIANS</var></code></p> <p><code><var>NUM_DEGREES</var>^{\circ} \times \frac{\pi}{180^{\circ}} = <var>NUM_RADIANS</var></code></p>
</div> </div>


<ul class="choices" data-show="4" data-none="true">
<li><var>wrongRadians( NUM_RADIANS ).toFixed( 2 )</var></li>
<li><var>wrongRadians( NUM_RADIANS ).toFixed( 2 )</var></li>
<li><var>wrongRadians( NUM_RADIANS ).toFixed( 2 )</var></li>
</ul>
</div> </div>
</div> </div>
</div> </div>
Expand Down
32 changes: 20 additions & 12 deletions exercises/radians_to_degrees.html
Expand Up @@ -13,27 +13,39 @@
<var id="NUM_RADIANS">roundTo( 2, toRadians(NUM_DEGREES) )</var> <var id="NUM_RADIANS">roundTo( 2, toRadians(NUM_DEGREES) )</var>


<!-- Common degree and radian values --> <!-- Common degree and radian values -->
<!-- (index rather than member-based selection is for wrong answer generation) --> <!-- (reformatted to include tau) -->
<var id="COMMON_INDEX">rand( commonAngles.length )</var> <var id="COMMON_INDEX">rand( commonAngles.length )</var>
<var id="COMMON_DEGREES">commonAngles[COMMON_INDEX].deg</var> <var id="COMMON_DEGREES">commonAngles[COMMON_INDEX].deg</var>
<var id="COMMON_RADIANS">commonAngles[COMMON_INDEX].rad</var> <var id="COMMON_RADIANS">commonAngles[COMMON_INDEX].rad</var>
<var id="COMMON_TAURADIANS">commonAngles[COMMON_INDEX].trad</var>
</div> </div>


<div class="problems"> <div class="problems">
<div id="radians-to-degrees"> <div id="radians-to-degrees">
<p class="question">Convert the angle <code><var>COMMON_RADIANS</var></code> radians into degrees.</p> <p class="question">Convert the angle <code><var>COMMON_RADIANS</var></code> radians into degrees.</p>
<p class="solution"><var>COMMON_DEGREES</var>&deg;</p> <div class="solution" data-type="multiple">
<span class="sol"> <var>COMMON_DEGREES</var></span><code>^{\circ}</code>
</div>


<div class="hints"> <div class="hints">
<p>To convert from radians to degrees, you multiply by <code>180^{\circ}</code> and then divide by <code>\pi</code>.</p> <p>To convert from radians to degrees, you multiply by <code>180^{\circ}</code> and then divide by <code>\pi</code>.</p>
<p><code><var>COMMON_RADIANS</var> \times \frac{180^{\circ}}{\pi} = <var>COMMON_DEGREES</var>^{\circ}</code></p> <p><code><var>COMMON_RADIANS</var> \times \frac{180^{\circ}}{\pi} = <var>COMMON_DEGREES</var>^{\circ}</code></p>
</div> </div>


<ul class="choices" data-show="4" data-none="true">
<li><var>wrongCommonAngle( COMMON_INDEX, 1 ).deg</var>&deg;</li> </div>
<li><var>wrongCommonAngle( COMMON_INDEX, 2 ).deg</var>&deg;</li>
<li><var>wrongCommonAngle( COMMON_INDEX, 3 ).deg</var>&deg;</li> <div id="tau-radians-to-degrees">
</ul> <p class="question">Convert the angle <code><var>COMMON_TAURADIANS</var></code> radians into degrees. (Note: this angle is given in terms of <code>\tau</code>, which equals <code>2\pi</code>)</p>
<div class="solution" data-type="multiple">
<span class="sol"> <var>COMMON_DEGREES</var></span><code>^{\circ}</code>
</div>
<div class="hints">
<p>To convert from radians to degrees, you multiply by <code>360^{\circ}</code> and then divide by <code>\tau</code>.</p>
<p><code><var>COMMON_TAURADIANS</var> \times \frac{360^{\circ}}{\tau} = <var>COMMON_DEGREES</var>^{\circ}</code></p>
</div>


</div> </div>


<div data-type="radians-to-degrees"> <div data-type="radians-to-degrees">
Expand All @@ -45,11 +57,7 @@
<p><code><var>NUM_RADIANS</var> \times \frac{180^{\circ}}{\pi} = <var>NUM_DEGREES</var>^{\circ}</code></p> <p><code><var>NUM_RADIANS</var> \times \frac{180^{\circ}}{\pi} = <var>NUM_DEGREES</var>^{\circ}</code></p>
</div> </div>


<ul class="choices" data-show="4" data-none="true">
<li><var>wrongDegrees( NUM_DEGREES )</var>&deg;</li>
<li><var>wrongDegrees( NUM_DEGREES )</var>&deg;</li>
<li><var>wrongDegrees( NUM_DEGREES )</var>&deg;</li>
</ul>
</div> </div>
</div> </div>
</div> </div>
Expand Down
34 changes: 17 additions & 17 deletions utils/angles.js
@@ -1,22 +1,22 @@
jQuery.extend( KhanUtil, { jQuery.extend( KhanUtil, {
commonAngles: [ commonAngles: [
{deg: 15, rad: "\\frac{\\pi}{12}"}, {deg: 15, rad: "\\frac{\\pi}{12}",trad: "\\frac{\\tau}{24}"},
{deg: 30, rad: "\\frac{\\pi}{6}"}, {deg: 30, rad: "\\frac{\\pi}{6}",trad: "\\frac{\\tau}{12}"},
{deg: 45, rad: "\\frac{\\pi}{4}"}, {deg: 45, rad: "\\frac{\\pi}{4}",trad: "\\frac{\\tau}{8}"},
{deg: 60, rad: "\\frac{\\pi}{3}"}, {deg: 60, rad: "\\frac{\\pi}{3}",trad: "\\frac{\\tau}{6}"},
{deg: 90, rad: "\\frac{\\pi}{2}"}, {deg: 90, rad: "\\frac{\\pi}{2}",trad: "\\frac{\\tau}{4}"},
{deg: 120, rad: "\\frac{2\\pi}{3}"}, {deg: 120, rad: "\\frac{2\\pi}{3}",trad: "\\frac{\\tau}{3}"},
{deg: 135, rad: "\\frac{3\\pi}{4}"}, {deg: 135, rad: "\\frac{3\\pi}{4}",trad: "\\frac{3\\tau}{8}"},
{deg: 150, rad: "\\frac{5\\pi}{6}"}, {deg: 150, rad: "\\frac{5\\pi}{6}",trad: "\\frac{5\\tau}{12}"},
{deg: 180, rad: "\\pi"}, {deg: 180, rad: "\\pi",trad: "\\frac{\\tau}{2}"},
{deg: 210, rad: "\\frac{7\\pi}{6}"}, {deg: 210, rad: "\\frac{7\\pi}{6}",trad: "\\frac{7\\tau}{8}"},
{deg: 225, rad: "\\frac{5\\pi}{4}"}, {deg: 225, rad: "\\frac{5\\pi}{4}",trad: "\\frac{5\\tau}{8}"},
{deg: 240, rad: "\\frac{4\\pi}{3}"}, {deg: 240, rad: "\\frac{4\\pi}{3}",trad: "\\frac{2\\tau}{3}"},
{deg: 270, rad: "\\frac{3\\pi}{2}"}, {deg: 270, rad: "\\frac{3\\pi}{2}",trad: "\\frac{3\\tau}{4}"},
{deg: 300, rad: "\\frac{5\\pi}{3}"}, {deg: 300, rad: "\\frac{5\\pi}{3}",trad: "\\frac{5\\tau}{6}"},
{deg: 315, rad: "\\frac{7\\pi}{4}"}, {deg: 315, rad: "\\frac{7\\pi}{4}",trad: "\\frac{7\\tau}{8}"},
{deg: 330, rad: "\\frac{11\\pi}{6}"}, {deg: 330, rad: "\\frac{11\\pi}{6}",trad: "\\frac{11\\tau}{12}"},
{deg: 360, rad: "2\\pi"} {deg: 360, rad: "2\\pi",trad: "\\tau"}
], ],


// Convert a degree value to a radian value // Convert a degree value to a radian value
Expand Down