Commit 094382d5 by Lyla Fischer

added solutions and basic metadata to templates

parent 6011d6d3
---
metadata:
display_name: Custom Grader
rerandomize: never
showanswer: always
data: |
<problem>
<text>
<h2>Example: Custom Response Problem</h2>
<p>
A custom response problem accepts one or more lines of text input from the
student, and evaluates the inputs for correctness based on evaluation using a
python script embedded within the problem.
</p>
<script type="loncapa/python">def test_add(expect,ans):
(a1,a2) = map(float,ans)
return (a1+a2)==10
</script>
<text>
Enter two integers which sum to 10: <br/>
<customresponse cfn="test_add">
<textline size="40" correct_answer="3"/><br/>
<textline size="40" correct_answer="7"/>
</customresponse>
</text>
</text>
</problem>
<problem>
<p>
A custom response problem accepts one or more lines of text input from the
student, and evaluates the inputs for correctness based on evaluation using a
python script embedded within the problem.
</p>
<script type="loncapa/python">
def test_add_to_ten(expect,ans):
a1=float(ans[0])
a2=float(ans[1])
return (a1+a2)==10
def test_add(expect,ans):
a1=float(ans[0])
a2=float(ans[1])
return (a1+a2)== float(expect)
</script>
<p>Enter two integers which sum to 10: </p>
<customresponse cfn="test_add_to_ten">
<textline size="40" correct_answer="3"/><br/>
<textline size="40" correct_answer="7"/>
</customresponse>
<p>Enter two integers which sum to 20: </p>
<customresponse cfn="test_add" expect="20">
<textline size="40" correct_answer="11"/><br/>
<textline size="40" correct_answer="9"/>
</customresponse>
<solution>
<div class="detailed-solution">
<p>Explanation</p>
<p>Any set of values on the line \(y = 10 - x\) and \(y = 20 - x\) satisfy these constraints.</p>
<img src="/static/images/simple_graph.png"/>
</div>
</solution>
</problem>
children: []
---
metadata:
display_name: Formula Repsonse
rerandomize: never
showanswer: always
data: |
<problem>
<text>
<h2>Example: Formula Response Problem</h2>
<p>
A formula response problem accepts a line of text input from the
student, and evaluates the input for correctness based on numerical sampling of
the symbolic formula which is given.
</p>
<p>
The answer is correct if it is within a specified numerical tolerance
of the expected answer.
</p>
<p>This kind of response checking can handle symbolic expressions, but places an extra burden
on the problem author to specify the allowed variables in the expression, and the
numerical ranges over which the variables must be sampled to test for correctness.</p>
<script type="loncapa/python">I = "m*c^2"</script>
<text>
<br/>
Give an equation for the relativistic energy of an object with mass m. Explicitly indicate multiplication with a <tt>*</tt> symbol.<br/>
</text>
<formularesponse type="cs" samples="m,c@1,2:3,4#10" answer="$I">
<responseparam description="Numerical Tolerance" type="tolerance"
default="0.00001" name="tol" />
<br/><text>E =</text> <textline size="40" math="1" />
</formularesponse>
</text>
</problem>
<problem>
<p>
A formula response problem accepts a line of text representing a mathematical expression from the
student, and evaluates the input for equivalence to a mathematical expression provided by the
grader. Correctness is based on numerical sampling of the symbolic expressions.
</p>
<p>
The answer is correct if both the student provided response and the grader's mathematical
expression are equivalent to specified numerical tolerance, over a specified range of values for each
variable.
</p>
<p>This kind of response checking can handle symbolic expressions, but places an extra burden
on the problem author to specify the allowed variables in the expression, and the
numerical ranges over which the variables must be sampled in order to test for correctness.</p>
<script type="loncapa/python">
VoVi = "(R_1*R_2)/R_3"
</script>
<p>Give an equation for the relativistic energy of an object with mass m. Explicitly indicate multiplication with a <tt>*</tt> symbol.</p>
<formularesponse type="cs" samples="m,c@1,2:3,4#10" answer="m*c^2">
<responseparam type="tolerance" default="0.00001"/>
<br/><text>E =</text> <textline size="40" math="1" />
</formularesponse>
<p>The answer to this question is (R_1*R_2)/R_3. </p>
<formularesponse type="ci" samples="R_1,R_2,R_3@1,2,3:3,4,5#10" answer="$VoVi">
<responseparam type="tolerance" default="0.00001"/>
<textline size="40" math="1" />
</formularesponse>
<solution>
<div class="detailed-solution">
<p>Explanation</p>
<p>The mathematical summary of many of the theory of relativity developed by Einstein is that the amount of energy contained in a mass m is the mass time the speed of light squared.</p>
<p>As you can see with the formula entry, the answer is \(\frac{R_1*R_2}{R_3}\)</p>
</div>
</solution>
</problem>
children: []
---
metadata:
display_name: Image Response
rerandomize: never
showanswer: always
data: |
<problem>
<text>
<h2>Example: Image Response Problem</h2>
<p>
When teaching conventionally, a common check for understanding is to ask the student to point
at something which satisfies a set of contraints. This use case is captured in the imageresponse.
An image response problem presents an image for the student. Input is
given by the location of mouse clicks on the image. Correctness of input can only be evaluated based on expected dimensions of a rectangle.
</p>
<text>
Click on the cow in this image:
<imageresponse>
<imageinput src="/static/cow.png" width="715" height="511" rectangle="(404,150)-(715,480)" />
</imageresponse>
</text>
</text>
</problem>
<problem>
<p>
An image response problem presents an image for the student. Input is
given by the location of mouse clicks on the image. Correctness of input can be evaluated based on expected dimensions of a rectangle.
</p>
<p>Which object in this image is required by the fire code?</p>
<imageresponse>
<imageinput src="/static/images/firecode.jpg" width="640" height="480" rectangle="(365,42)-(423,66)" />
</imageresponse>
<solution>
<div class="detailed-solution">
<p>Explanation</p>
<p>The fire code requires that all exits be clearly marked, so the red exit sign is the correct answer.</p>
</div>
</solution>
</problem>
children: []
---
metadata:
display_name: Multiline XML
data: |
<problem>
</problem>
children: []
---
metadata:
display_name: Multiple Choice
rerandomize: never
showanswer: always
data: |
<problem>
<text>
<h2>Example: Multiple Choice Response Problem</h2>
<p>
A multiple choice response problem presents radio buttons for student
input. Correctness of
input is evaluated based on expected answers specified within each
"choice" stanza.
</p>
<p>Select the correct choice. Grass is:</p>
<multiplechoiceresponse direction="vertical" randomize="yes">
<choicegroup type="MultipleChoice">
<choice location="random" correct="false" name="red">Red</choice>
<choice location="random" correct="true" name="green">Green</choice>
<choice location="random" correct="false" name="yellow">Yellow</choice>
<choice location="bottom" correct="false" name="blue">Blue</choice>
</choicegroup>
</multiplechoiceresponse>
</text>
</problem>
<problem>
<p>
A multiple choice problem presents radio buttons for student
input. Students can only select a single option presented. Multiple Choice questions have been the subject of many areas of research due to the early invention and adoption of bubble sheets.</p>
<p> One of the main elements that goes into a good multiple choice question is the existence of good distractors. That is, each of the alternate responses presented to the student should be the result of a plausible mistake that a student might make.
</p>
<p>What Apple device competed with the portable CD player?</p>
<multiplechoiceresponse>
<choicegroup type="MultipleChoice">
<choice correct="false" name="ipad">The iPad</choice>
<choice correct="false" name="beatles">Napster</choice>
<choice correct="true" name="ipod">The iPod</choice>
<choice correct="false" name="peeler">The vegetable peeler</choice>
<choice correct="false" name="android">Android</choice>
<choice correct="false" name="beatles">The Beatles</choice>
</choicegroup>
</multiplechoiceresponse>
<solution>
<div class="detailed-solution">
<p>Explanation</p>
<p>The release of the iPod allowed consumers to carry their entire music library with them in a format that did not rely on fragile and enery-intensive spinning disks. </p>
</div>
</solution>
</problem>
children: []
---
metadata:
display_name: Numerical Response
rerandomize: never
showanswer: always
data: |
<problem>
<text>
<h2>Example: Numerical Response Problem</h2>
<p>
<problem>
<p>
A numerical response problem accepts a line of text input from the
student, and evaluates the input for correctness based on its
numerical value.
</p>
<p>
</p>
<p>
The answer is correct if it is within a specified numerical tolerance
of the expected answer.
</p>
<p>Enter the numerical value of Pi:
<numericalresponse answer="3.14159">
<responseparam type="tolerance" default="5%" name="tol" description="Numerical Tolerance" />
<textline />
</numericalresponse>
</p>
</text>
</problem>
</p>
<script type="loncapa/python">
computed_response = 502*9
</script>
<p>Enter the numerical value of Pi:
<numericalresponse answer="3.14159">
<responseparam type="tolerance" default=".02" />
<textline />
</numericalresponse>
</p>
<p>Enter the approximate value of 502*9:
<numericalresponse answer="$computed_response">
<responseparam type="tolerance" default="15%"/>
<textline />
</numericalresponse>
</p>
<p>Enter the number of fingers on a human hand:
<numericalresponse answer="5">
<textline />
</numericalresponse>
</p>
<solution>
<div class="detailed-solution">
<p>Explanation</p>
<p>Pi, or the the ratio between a circle's circumference to its diameter, is an irrational number known to extreme precision. It is value is approximately equal to 3.14.</p>
<p>Although you can get an exact value by typing 502*9 into a calculator, the result will be close to 500*10, or 5,000. The grader accepts any response within 15% of the true value, 4518, so that you can use any estimation technique that you like.</p>
<p>If you look at your hand, you can count that you have five fingers.</p>
</div>
</solution>
</problem>
children: []
---
metadata:
display_name: Option Response
rerandomize: never
showanswer: always
data: |
<problem>
<text>
<h2>Example: Option Response Problem</h2>
<p>
An option response problem presents option boxes for students to select from. Correctness of input is evaluated based
on which option is defined as correct in the optioninput statement.
</p>
<p>Select the correct options:</p>
<optionresponse direction="vertical" randomize="yes">
<p><text class="inline">The location of the sky is: </text><optioninput inline="1" options="('Up','Down')" correct="Up"></optioninput></p>
<p><text>The location of the earth is: </text><optioninput options="('Up','Down')" correct="Down"></optioninput></p>
</optionresponse>
</text>
</problem>
<problem>
<p>OptionResponse gives a limited set of options for students to respond with, and presents those options
in a format that encourages them to search for a specific answer rather than being immediately presented with options from which to recognize the correct answer.</p>
<p>
The answer options and the identification of the correct answer is defined in the <b>optioninput</b> tag.
</p>
<p>Translation between Option Response and __________ is extremely straightforward:
<optionresponse>
<optioninput options="('Multiple Choice','String Response','Numerical Response','External Response','Image Response')" correct="Multiple Choice"></optioninput>
</optionresponse>
</p>
<solution>
<div class="detailed-solution">
<p>Explanation</p>
<p>Multiple Choice also allows students to select from a variety of pre-written responses, although the format makes it easier for students to read very long response options. Optionresponse also differs slightly because students are more likely to think of an answer and then search for it rather than relying purely on recognition to answer the question.</p>
</div>
</solution>
</problem>
children: []
---
metadata:
display_name: String Response
rerandomize: never
showanswer: always
data: |
<problem >
<text>
<h2>Example: String Response Problem</h2>
<problem showanswer="always">
<p>
A string response problem accepts a line of text input from the
student, and evaluates the input for correctness based on an expected
answer within each input box.
The answer is correct if it is the expected answer.
A string response problem accepts a line of text input from the
student, and evaluates the input for correctness based on an expected
answer within each input box.
The answer is correct if it matches every character of the expected answer. This can be a problem with international spelling, dates, or anything where the format of the answer is not clear.
</p>
</text>
<span style="display:inline">
<p style="display:inline">Which US state has Lansing as its capital? &#160; &#160;</p>
<stringresponse answer="Michigan" type="ci">
<textline size="20" inline="1"/>
<hintgroup>
<stringhint answer="wisconsin" type="cs" name="wisc">
</stringhint>
<stringhint answer="minnesota" type="cs" name="minn">
</stringhint>
<hintpart on="wisc">
<text>The state capital of Wisconsin is Madison.</text>
</hintpart>
<hintpart on="minn">
<text>The state capital of Minnesota is St. Paul.</text>
</hintpart>
<hintpart on="default">
<text>The state you are looking for is also known as the 'Great Lakes State'</text>
</hintpart>
</hintgroup>
</stringresponse>
</span>
<p >Which US state has Lansing as its capital? </p>
<stringresponse answer="Michigan" type="ci">
<textline size="20"/>
</stringresponse>
<solution>
<div class="detailed-solution">
<p>Explanation</p>
<p>Lansing is the capital of Michigan, although it is not Michgan's largest city, or even the seat of the county in which it resides.</p>
</div>
</solution>
</problem>
children: []
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment