AnyAnswerMarkedCorrect
Jump to navigation
Jump to search
Any Answer Marked Correct
This PG code shows how to mark any answer a student submits as correct.
PG problem file | Explanation |
---|---|
DOCUMENT(); loadMacros( "PGstandard.pl", "MathObjects.pl", "PGasu.pl", "PGcourse.pl", ); TEXT(beginproblem()); |
Initialization:
We need to include the macros file |
Context("Numeric"); Context()->variables->are(x=>"Real",y=>"Real",u=>"Real"); $a = random(2,9,1); |
Setup: Everything is as usual. |
Context()->texStrings; BEGIN_TEXT Enter anything, e.g. \($a\) and it will be marked correct: \{ans_rule(10) \}. END_TEXT Context()->normalStrings; |
Main Text: The text section is as we'd expect. |
$showPartialCorrectAnswers = 1; ANS(auto_right("All answers are marked correct")); ENDDOCUMENT(); |
Answer Evaluation:
We use the |
- POD documentation: PGasu.pl.html
- PG macro: PGasu.pl