########################### # Initialization DOCUMENT(); loadMacros( "PGstandard.pl", "MathObjects.pl", "PGML.pl", "PGbasicmacros.pl", "parserRadioButtons.pl", "draggableProof.pl", "PGcourse.pl" ); TEXT(beginproblem()); ########################### # Setup Context("Numeric"); $CorrectProof = DraggableProof([ "Let \(n\) be even.", "By the definition of even, \(n = 2k\) for some integer \(k\).", "It follows that \(\\n^2 + 3n + 5 = (2k)^2 + 3(2k) + 5\) \(\\ \hspace{38mm}= 4k^2 + 6k + 5\) \(\\ \hspace{37mm} = 2(2k^2 + 3k+ 2) + 1\)", "Since \(k\) is an integer,", "\(2k^2 + 3k+ 2\) is an integer.", "Since \(n^2 + 3n + 5\) equals \(2\) times an integer plus one,", "\(n^2 + 3n + 5\) is odd."], # The lines below are extras and will be listed as options but not # needed for the correct answer in $Proof. ["\(2k^2 + 3k+ 2\) is even.", "By the definition of odd, \(n = 2k + 1\) for some integer \(k\).", "Let \(n\) be odd."] , SourceLabel => "Choose from this list of sentences", TargetLabel => "Direct proof of the statement (in order):", ); ################################### # Main text BEGIN_PGML Order *[$CorrectProof->numNeeded] of* the following sentences so that they form a direct proof of the statement: If [`n`] is even, then [`n^2 + 3n + 5`] is odd. [@ $CorrectProof->Print @]* END_PGML ############################ # Answer evaluation $showPartialCorrectAnswers = 0; install_problem_grader(~~&std_problem_grader); ANS($CorrectProof->cmp); ENDDOCUMENT();