[npl] / trunk / NationalProblemLibrary / ASU-topics / set119MatrixAlgebra / p18.pg Repository:
ViewVC logotype

View of /trunk/NationalProblemLibrary/ASU-topics/set119MatrixAlgebra/p18.pg

Parent Directory Parent Directory | Revision Log Revision Log


Revision 268 - (download) (annotate)
Sat Jun 3 14:35:45 2006 UTC (7 years ago) by gage
File size: 2065 byte(s)
 Cleaned code with convert-functions.pl script

    1 ## DESCRIPTION
    2 ## Matrix Algebra
    3 ## ENDDESCRIPTION
    4 
    5 ## KEYWORDS('Algebra' 'Matrix' 'Matrices' 'True' 'False')
    6 ## Tagged by tda2d
    7 
    8 ## DBsubject('Algebra')
    9 ## DBchapter('Linear Algebra')
   10 ## DBsection('Matrix Algebra')
   11 ## Date('')
   12 ## Author('')
   13 ## Institution('ASU')
   14 ## TitleText1('')
   15 ## EditionText1('')
   16 ## AuthorText1('')
   17 ## Section1('')
   18 ## Problem1('')
   19 
   20 DOCUMENT();
   21 loadMacros("PGbasicmacros.pl",
   22            "PGchoicemacros.pl",
   23            "PGanswermacros.pl",
   24 
   25 );
   26 TEXT(beginproblem(), $BR,$BBOLD, "True False Problem", $EBOLD, $BR,$BR);
   27 # Since this is a true questions, we do not usually wish to tell students which
   28 # parts of the matching question have been answered correctly and which are
   29 # incorrect.  That is too easy.  To accomplish this we set the following flag to
   30 # zero.
   31 $showPartialCorrectAnswers = 0;
   32 
   33 # True false questions are a special case of a "select list"
   34 # Make a new select list
   35 $tf = new_select_list();
   36 # $tf now "contains" the select list object.
   37 # Insert some  questions and whether or not they are true.
   38 
   39 $tf -> qa ( # each entry has to end with a comma
   40 "If A and B are both square matrices such that AB equals BA equals the identity matrix, then B is the inverse matrix of A.",
   41 "T",
   42 "If A is a square matrix, then there exists a matrix B such that AB equals the identity matrix.",
   43 "F",
   44 "If \( AX = B \) represents a system of linear equations and \( A^{-1} \) exists, then the product \( A^{-1}B \) gives the solution to the system.",
   45 "T",
   46 );   # every statement has to end with a semi-colon.
   47 
   48 # Choose two of the question and answer pairs at random.
   49 $tf ->choose(2);
   50 
   51 # Now print the text using $ml->print_q for the questions
   52 # and $ml->print_a to print the answers.
   53 
   54 BEGIN_TEXT
   55 $PAR
   56 
   57 Enter T or F depending on whether the statement is true or false.
   58 (You must enter T or F -- True and False will not work.)$BR
   59 
   60 \{ $tf-> print_q \}
   61 
   62 $PAR
   63 
   64 END_TEXT
   65 
   66 # Enter the correct answers to be checked against the answers to the students.
   67 
   68 ANS(str_cmp( $tf->ra_correct_ans )   ) ;
   69 
   70 ENDDOCUMENT();        # This should be the last executable

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9