Difference between revisions of "Volume3"
Jump to navigation
Jump to search
(Created page with '<h2>A Question That Provides Credit Only When All Answers Are Correct</h2> 300px|thumb|right|Click to enlarge <p style="background-color:#f9f9f9;border:blac…') |
(add historical tag and give links to newer problems.) |
||
(3 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
+ | {{historical}} |
||
+ | |||
+ | <p style="font-size: 120%;font-weight:bold">This problem has been replaced with [https://openwebwork.github.io/pg-docs/sample-problems/IntegralCalc/VolumeOfRevolution.html a newer version of this problem]</p> |
||
+ | |||
<h2>A Question That Provides Credit Only When All Answers Are Correct</h2> |
<h2>A Question That Provides Credit Only When All Answers Are Correct</h2> |
||
Line 5: | Line 9: | ||
This PG code shows how to ask students to set up a volume of solids of revolution integral in which all parts must be correct for the student to receive any credit. |
This PG code shows how to ask students to set up a volume of solids of revolution integral in which all parts must be correct for the student to receive any credit. |
||
</p> |
</p> |
||
− | * Download file: [[File:Volume3.txt]] (change the file extension from txt to pg when you save it) |
||
+ | * File location in OPL: [https://github.com/openwebwork/webwork-open-problem-library/blob/master/OpenProblemLibrary/FortLewis/Authoring/Templates/IntegralCalc/Volume3.pg FortLewis/Authoring/Templates/IntegralCalc/Volume3.pg] |
||
− | * |
+ | * PGML location in OPL: [https://github.com/openwebwork/webwork-open-problem-library/blob/master/OpenProblemLibrary/FortLewis/Authoring/Templates/IntegralCalc/Volume3_PGML.pg FortLewis/Authoring/Templates/IntegralCalc/Volume3_PGML.pg] |
<br clear="all" /> |
<br clear="all" /> |
||
Line 179: | Line 183: | ||
Context()->texStrings; |
Context()->texStrings; |
||
BEGIN_SOLUTION |
BEGIN_SOLUTION |
||
− | ${PAR}SOLUTION:${PAR} |
||
Solution explanation goes here. |
Solution explanation goes here. |
||
END_SOLUTION |
END_SOLUTION |
||
Line 204: | Line 207: | ||
[[Category:Top]] |
[[Category:Top]] |
||
− | [[Category: |
+ | [[Category:Sample Problems]] |
+ | [[Category:Subject Area Templates]] |
Latest revision as of 05:17, 18 July 2023
This problem has been replaced with a newer version of this problem
A Question That Provides Credit Only When All Answers Are Correct
This PG code shows how to ask students to set up a volume of solids of revolution integral in which all parts must be correct for the student to receive any credit.
- File location in OPL: FortLewis/Authoring/Templates/IntegralCalc/Volume3.pg
- PGML location in OPL: FortLewis/Authoring/Templates/IntegralCalc/Volume3_PGML.pg
PG problem file | Explanation |
---|---|
Problem tagging: |
|
DOCUMENT(); loadMacros( "PGstandard.pl", "MathObjects.pl", "PGunion.pl", "answerHints.pl", ); TEXT(beginproblem()); install_problem_grader(~~&std_problem_grader); $showPartialCorrectAnswers = 1; |
Initialization: We install the standard problem grader, which is an all-or-nothing grader. |
Context("Numeric"); Context()->variables->are( x=>"Real", dx=>"Real", y=>"Real", dy=>"Real" ); $f = Compute("x"); $g = Compute("x^2"); $upper = Real("1"); $lower = Real("0"); # answers below are intentionally wrong $int = Compute("( pi x - pi x^2 ) dx"); $vol = Compute("pi"); # # Display the answer blanks properly in different modes # Context()->texStrings; if ($displayMode eq 'TeX') { $integral = 'Volume = \(\displaystyle' . '\int_{'. ans_rule(4). '}^{'. ans_rule(4). '}'. ans_rule(30). ' = '. ans_rule(10). '\)'; } else { $integral = BeginTable(center=>0). Row([ 'Volume = \(\displaystyle\int\)', ans_rule(4).$BR.$BR. ans_rule(4), ans_rule(30).$SPACE.' = '.$SPACE. ans_rule(10), ],separation=>2). EndTable(); } Context()->normalStrings; |
Setup:
Notice that we use |
Context()->texStrings; BEGIN_TEXT Set up and evaluate an integral for the volume of the solid of revolution obtained by rotating the region bounded by \( y = $f \) and \( y = $g \) about the \(x\)-axis. $BR $BR $integral END_TEXT Context()->normalStrings; |
Main Text: The standard problem grader automatically provides a message to students that says the grading will be all or nothing. |
ANS( $upper->cmp() ); ANS( $lower->cmp() ); ANS( $int->cmp() ->withPostFilter(AnswerHints( Formula("pi x - pi x^2 dx") => "Don't forget to multiply every term in the integrand by dx", Formula("pi x - pi x^2") => "Don't forget the differential dx", Formula("(pi x^2 - pi x)*dx") => "Is the parabola above the line?", Formula("pi x^2 - pi x") => "Is the parabola above the line?", )) ); ANS( $vol->cmp() ); |
Answer Evaluation: |
Context()->texStrings; BEGIN_SOLUTION Solution explanation goes here. END_SOLUTION Context()->normalStrings; COMMENT('MathObject version. Gives full credit only if all answers are correct.'); ENDDOCUMENT(); |
Solution: |