Parent Directory
|
Revision Log
Problem Authoring Tutorial and Templates for the wiki page SubjectAreaTemplates
1 ## DESCRIPTION 2 ## Integral calculus: sequences 3 ## ENDDESCRIPTION 4 5 ## KEYWORDS('integral calculus', 'sequences') 6 7 ## DBsubject('WeBWorK') 8 ## DBchapter('WeBWorK Tutorial') 9 ## DBsection('Fort Lewis Tutorial 2011') 10 ## Date('01/30/2011') 11 ## Author('Paul Pearson') 12 ## Institution('Fort Lewis College') 13 ## TitleText1('') 14 ## EditionText1('') 15 ## AuthorText1('') 16 ## Section1('') 17 ## Problem1('') 18 19 20 ########################### 21 # Initialization 22 23 DOCUMENT(); 24 25 loadMacros( 26 "PGstandard.pl", 27 "MathObjects.pl", 28 "AnswerFormatHelp.pl", 29 ); 30 31 TEXT(beginproblem()); 32 33 34 ########################### 35 # Setup 36 37 Context("Numeric"); 38 Context()->variables->are(n=>"Real"); 39 40 $answer = Compute("(-1)^n / n!"); 41 $answer->{test_points} = [[1],[2],[3],[4],[5],[6]]; 42 43 @seq = ( 44 "a_0 = 1", 45 "a_1 = -1", 46 "a_2 = \frac{1}{2}", 47 "a_3 = -\frac{1}{6}", 48 "a_4 = \frac{1}{24}", 49 "a_5 = -\frac{1}{120}", 50 "\ldots" 51 ); 52 53 $sequence = join(", ", @seq); 54 55 56 ########################### 57 # Main text 58 59 Context()->texStrings; 60 BEGIN_TEXT 61 Find a formula for \( n^{th} \) term of the sequence \( $sequence \). 62 $BR 63 $BR 64 \( a_n = \) 65 \{ ans_rule(20) \} 66 \{ AnswerFormatHelp("formulas") \} 67 END_TEXT 68 Context()->normalStrings; 69 70 71 ############################ 72 # Answer evaluation 73 74 $showPartialCorrectAnswers=1; 75 76 ANS( $answer->cmp() ); 77 78 79 ############################ 80 # Solution 81 82 Context()->texStrings; 83 BEGIN_SOLUTION 84 ${PAR}SOLUTION:${PAR} 85 Solution explanation goes here. 86 END_SOLUTION 87 Context()->normalStrings; 88 89 COMMENT('MathObject version.'); 90 91 ENDDOCUMENT();
| aubreyja at gmail dot com | ViewVC Help |
| Powered by ViewVC 1.0.9 |