Commit 094382d5 by Lyla Fischer

added solutions and basic metadata to templates

parent 6011d6d3
--- ---
metadata: metadata:
display_name: Custom Grader display_name: Custom Grader
rerandomize: never
showanswer: always
data: | data: |
<problem> <problem>
<text> <p>
<h2>Example: Custom Response Problem</h2> 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
<p> python script embedded within the problem.
A custom response problem accepts one or more lines of text input from the </p>
student, and evaluates the inputs for correctness based on evaluation using a
python script embedded within the problem. <script type="loncapa/python">
</p>
def test_add_to_ten(expect,ans):
<script type="loncapa/python">def test_add(expect,ans): a1=float(ans[0])
(a1,a2) = map(float,ans) a2=float(ans[1])
return (a1+a2)==10 return (a1+a2)==10
</script> def test_add(expect,ans):
a1=float(ans[0])
<text> a2=float(ans[1])
Enter two integers which sum to 10: <br/> return (a1+a2)== float(expect)
<customresponse cfn="test_add">
<textline size="40" correct_answer="3"/><br/> </script>
<textline size="40" correct_answer="7"/>
</customresponse> <p>Enter two integers which sum to 10: </p>
</text> <customresponse cfn="test_add_to_ten">
<textline size="40" correct_answer="3"/><br/>
</text> <textline size="40" correct_answer="7"/>
</problem> </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: [] children: []
--- ---
metadata: metadata:
display_name: Formula Repsonse display_name: Formula Repsonse
rerandomize: never
showanswer: always
data: | data: |
<problem> <problem>
<text> <p>
<h2>Example: Formula Response Problem</h2> 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
<p> grader. Correctness is based on numerical sampling of the symbolic expressions.
A formula response problem accepts a line of text input from the </p>
student, and evaluates the input for correctness based on numerical sampling of <p>
the symbolic formula which is given. The answer is correct if both the student provided response and the grader's mathematical
</p> expression are equivalent to specified numerical tolerance, over a specified range of values for each
variable.
<p> </p>
The answer is correct if it is within a specified numerical tolerance
of the expected answer. <p>This kind of response checking can handle symbolic expressions, but places an extra burden
</p> 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>
<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 <script type="loncapa/python">
numerical ranges over which the variables must be sampled to test for correctness.</p> VoVi = "(R_1*R_2)/R_3"
</script>
<script type="loncapa/python">I = "m*c^2"</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">
<text> <responseparam type="tolerance" default="0.00001"/>
<br/> <br/><text>E =</text> <textline size="40" math="1" />
Give an equation for the relativistic energy of an object with mass m. Explicitly indicate multiplication with a <tt>*</tt> symbol.<br/> </formularesponse>
</text>
<formularesponse type="cs" samples="m,c@1,2:3,4#10" answer="$I"> <p>The answer to this question is (R_1*R_2)/R_3. </p>
<responseparam description="Numerical Tolerance" type="tolerance"
default="0.00001" name="tol" /> <formularesponse type="ci" samples="R_1,R_2,R_3@1,2,3:3,4,5#10" answer="$VoVi">
<br/><text>E =</text> <textline size="40" math="1" /> <responseparam type="tolerance" default="0.00001"/>
</formularesponse> <textline size="40" math="1" />
</formularesponse>
</text> <solution>
</problem> <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: [] children: []
--- ---
metadata: metadata:
display_name: Image Response display_name: Image Response
rerandomize: never
showanswer: always
data: | data: |
<problem> <problem>
<text> <p>
<h2>Example: Image Response Problem</h2> 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>
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. <p>Which object in this image is required by the fire code?</p>
An image response problem presents an image for the student. Input is <imageresponse>
given by the location of mouse clicks on the image. Correctness of input can only be evaluated based on expected dimensions of a rectangle. <imageinput src="/static/images/firecode.jpg" width="640" height="480" rectangle="(365,42)-(423,66)" />
</imageresponse>
</p> <solution>
<div class="detailed-solution">
<text> <p>Explanation</p>
Click on the cow in this image: <p>The fire code requires that all exits be clearly marked, so the red exit sign is the correct answer.</p>
<imageresponse> </div>
<imageinput src="/static/cow.png" width="715" height="511" rectangle="(404,150)-(715,480)" /> </solution>
</imageresponse> </problem>
</text>
</text>
</problem>
children: [] children: []
---
metadata:
display_name: Multiline XML
data: |
<problem>
</problem>
children: []
--- ---
metadata: metadata:
display_name: Multiple Choice display_name: Multiple Choice
rerandomize: never
showanswer: always
data: | data: |
<problem> <problem>
<text> <p>
<h2>Example: Multiple Choice Response Problem</h2> 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> <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.
A multiple choice response problem presents radio buttons for student </p>
input. Correctness of
input is evaluated based on expected answers specified within each <p>What Apple device competed with the portable CD player?</p>
"choice" stanza. <multiplechoiceresponse>
</p> <choicegroup type="MultipleChoice">
<choice correct="false" name="ipad">The iPad</choice>
<p>Select the correct choice. Grass is:</p> <choice correct="false" name="beatles">Napster</choice>
<multiplechoiceresponse direction="vertical" randomize="yes"> <choice correct="true" name="ipod">The iPod</choice>
<choicegroup type="MultipleChoice"> <choice correct="false" name="peeler">The vegetable peeler</choice>
<choice location="random" correct="false" name="red">Red</choice> <choice correct="false" name="android">Android</choice>
<choice location="random" correct="true" name="green">Green</choice> <choice correct="false" name="beatles">The Beatles</choice>
<choice location="random" correct="false" name="yellow">Yellow</choice> </choicegroup>
<choice location="bottom" correct="false" name="blue">Blue</choice> </multiplechoiceresponse>
</choicegroup> <solution>
</multiplechoiceresponse> <div class="detailed-solution">
</text> <p>Explanation</p>
</problem> <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: [] children: []
--- ---
metadata: metadata:
display_name: Numerical Response display_name: Numerical Response
rerandomize: never
showanswer: always
data: | data: |
<problem> <problem>
<text> <p>
<h2>Example: Numerical Response Problem</h2>
<p>
A numerical response problem accepts a line of text input from the A numerical response problem accepts a line of text input from the
student, and evaluates the input for correctness based on its student, and evaluates the input for correctness based on its
numerical value. numerical value.
</p> </p>
<p> <p>
The answer is correct if it is within a specified numerical tolerance The answer is correct if it is within a specified numerical tolerance
of the expected answer. of the expected answer.
</p> </p>
<script type="loncapa/python">
<p>Enter the numerical value of Pi: computed_response = 502*9
<numericalresponse answer="3.14159"> </script>
<responseparam type="tolerance" default="5%" name="tol" description="Numerical Tolerance" />
<textline /> <p>Enter the numerical value of Pi:
</numericalresponse> <numericalresponse answer="3.14159">
</p> <responseparam type="tolerance" default=".02" />
</text> <textline />
</problem> </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: [] children: []
--- ---
metadata: metadata:
display_name: Option Response display_name: Option Response
rerandomize: never
showanswer: always
data: | data: |
<problem> <problem>
<text> <p>OptionResponse gives a limited set of options for students to respond with, and presents those options
<h2>Example: Option Response Problem</h2> 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>
An option response problem presents option boxes for students to select from. Correctness of input is evaluated based <p>
on which option is defined as correct in the optioninput statement. The answer options and the identification of the correct answer is defined in the <b>optioninput</b> tag.
</p> </p>
<p>Select the correct options:</p> <p>Translation between Option Response and __________ is extremely straightforward:
<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> <optionresponse>
<p><text>The location of the earth is: </text><optioninput options="('Up','Down')" correct="Down"></optioninput></p> <optioninput options="('Multiple Choice','String Response','Numerical Response','External Response','Image Response')" correct="Multiple Choice"></optioninput>
</optionresponse> </optionresponse>
</text> </p>
</problem> <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: [] children: []
--- ---
metadata: metadata:
display_name: String Response display_name: String Response
rerandomize: never
showanswer: always
data: | data: |
<problem > <problem showanswer="always">
<text>
<h2>Example: String Response Problem</h2>
<p> <p>
A string response problem accepts a line of text input from the A string response problem accepts a line of text input from the
student, and evaluates the input for correctness based on an expected student, and evaluates the input for correctness based on an expected
answer within each input box. answer within each input box.
The answer is correct if it is the expected answer. 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> </p>
</text>
<p >Which US state has Lansing as its capital? </p>
<span style="display:inline"> <stringresponse answer="Michigan" type="ci">
<p style="display:inline">Which US state has Lansing as its capital? &#160; &#160;</p> <textline size="20"/>
<stringresponse answer="Michigan" type="ci"> </stringresponse>
<textline size="20" inline="1"/> <solution>
<hintgroup> <div class="detailed-solution">
<stringhint answer="wisconsin" type="cs" name="wisc"> <p>Explanation</p>
</stringhint> <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>
<stringhint answer="minnesota" type="cs" name="minn"> </div>
</stringhint> </solution>
<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>
</problem> </problem>
children: [] 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