Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Don't require calculator for some degree->radian problems

  • Loading branch information...
commit a455670aea7c4207d46547c704e975176bd0e67c 1 parent b66fbed
@beneater beneater authored
Showing with 27 additions and 26 deletions.
  1. +27 −26 exercises/degrees_to_radians.html
View
53 exercises/degrees_to_radians.html
@@ -1,5 +1,5 @@
<!DOCTYPE html>
-<html data-require="math angles math-format">
+<html data-require="math angles">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Degrees to radians</title>
@@ -8,39 +8,40 @@
<body>
<div class="exercise">
<div class="vars">
- <!-- Numerical degree and radian values -->
- <var id="NUM_DEGREES">rand(360)</var>
- <var id="NUM_RADIANS">roundTo( 2, toRadians(NUM_DEGREES) )</var>
-
- <!-- Common degree and radian values -->
- <!-- (index rather than member-based selection is for wrong answer generation) -->
- <var id="COMMON_INDEX">rand( commonAngles.length )</var>
- <var id="COMMON_DEGREES">commonAngles[COMMON_INDEX].deg</var>
- <!--<var id="COMMON_RADIANS">commonAngles[COMMON_INDEX].rad</var>-->
- <var id="COMMON_RADIANS">fractionReduce( COMMON_DEGREES, 180 )</var>
- <var id="SOLUTION">COMMON_DEGREES / 180 * Math.PI</var>
+ <var id="ANGLE">randFromArray(commonAngles)</var>
</div>
<div class="problems">
<div id="degrees-to-radians">
- <p class="question">Convert the angle <var>COMMON_DEGREES</var>&deg; into radians. (answer in terms of pi)</p>
- <p class="solution" data-forms="pi"><code><var>SOLUTION</var></code></p>
+ <p class="question">
+ Convert the angle <var>ANGLE.deg</var>&deg; to radians.
+ </p>
- <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><code><var>COMMON_DEGREES</var>^{\circ} \times \dfrac{\pi}{(180^{\circ})}</code></p>
- <p><code><var>COMMON_RADIANS</var>\pi</code></p>
+ <div class="solution" data-type="multiple">
+ <span class="sol" data-forms="pi">
+ <var>ANGLE.deg / 180 * PI</var>
+ </span> radians
</div>
- </div>
-
- <div id="degrees-to-radians-2">
- <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" data-type="multiple"><span class="sol" data-inexact="true" data-forms="decimal"><var>NUM_RADIANS</var></span> radians</p>
<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><code><var>NUM_DEGREES</var>^{\circ} \times \dfrac{\pi}{180^{\circ}}</code></p>
- <p><code><var>NUM_RADIANS</var></code></p>
+ <p>
+ There are <code>360</code> degrees in a circle. There
+ are also <code>2\pi</code> radians in a circle.
+ </p>
+ <p>
+ In other words, there are <code>\pi</code> radians per
+ <code>180</code> degrees. So we can convert from
+ degrees to radians by multiplying by <code>\pi</code>,
+ and dividing by <code>180^\circ</code>.
+ </p>
+ <p><code>
+ <var>ANGLE.deg</var>^\circ
+ \times \dfrac{\pi}{180^\circ}
+ </code></p>
+ <p>
+ <code>\displaystyle = <var>ANGLE.rad</var></code>
+ radians
+ </p>
</div>
</div>
</div>
Please sign in to comment.
Something went wrong with that request. Please try again.