##DESCRIPTION ## Simplify factorials ##ENDDESCRIPTION ## KEYWORDS('Sequences and Series') ## Tagged by ynw2d ## DBsubject('Algebra') ## DBchapter('Sequences and Series') ## DBsection('Arithmetic Sequences') ## Date('') ## Author('') ## Institution('ASU') ## TitleText1('') ## EditionText1('') ## AuthorText1('') ## Section1('') ## Problem1('') ##KEYWORDS('algebra', 'sequence') ##KEYWORDS('factorials') # # First comes some stuff that appears at the beginning of every problem # DOCUMENT(); # This should be the first executable line in the problem. loadMacros( "PG.pl", "PGbasicmacros.pl", "PGchoicemacros.pl", "PGanswermacros.pl", "PGauxiliaryFunctions.pl", "PGasu.pl" ); TEXT(&beginproblem); # # Choose the denominator # $b = random(1,30); #Pick how many more the numerator will be $c = random(1,5); #Calculate the numerator $a = $b + $c; #calculate the answer $ans = $a; for($j=$b+1; $j<$a; $j++) { $ans *= $j; } #Now the problem BEGIN_TEXT Evaluate \[\frac{$a !}{$b !}\] $PAR \(\frac{$a !}{$b !}\) =\{ans_rule(40)\} END_TEXT # # Tell WeBWork how to test if answers are right. These should come in the # same order as the answer blanks above. You tell WeBWork both the type of # "answer evaluator" to use, and the correct answer. # &ANS(num_cmp($ans)); ENDDOCUMENT(); # This should be the last executable line in the problem.