diff --git a/Contrib/LaTech/DiscreteMath/README.md b/Contrib/LaTech/DiscreteMath/README.md new file mode 100644 index 0000000000..664cdb233d --- /dev/null +++ b/Contrib/LaTech/DiscreteMath/README.md @@ -0,0 +1 @@ +This subfolder contains problems authored by Jason Terry (jterry@latech.edu) for a course in Discrete Mathematics in the Departments of Mathematics or Computer Science. diff --git a/Contrib/LaTech/DiscreteMath/ch1s1_propositions/ifthen1.pg b/Contrib/LaTech/DiscreteMath/ch1s1_propositions/ifthen1.pg index db4b99438a..1077dce952 100644 --- a/Contrib/LaTech/DiscreteMath/ch1s1_propositions/ifthen1.pg +++ b/Contrib/LaTech/DiscreteMath/ch1s1_propositions/ifthen1.pg @@ -18,8 +18,8 @@ DOCUMENT(); loadMacros( "PGstandard.pl", "parserPopUp.pl", -"PGcourse.pl", -"PGML.pl" +"PGML.pl", +"PGcourse.pl" ); ## Create an array of possible statement variations @@ -40,8 +40,6 @@ $pop4 = PopUp(["Choose...",$a], 4); $pop5 = PopUp(["Choose...",$a], 5); ## Display question -TEXT(beginproblem()); - BEGIN_PGML Consider the following statement: diff --git a/Contrib/LaTech/DiscreteMath/ch1s1_propositions/ifthen2.pg b/Contrib/LaTech/DiscreteMath/ch1s1_propositions/ifthen2.pg index f28eb992a6..90b2b5e5ed 100644 --- a/Contrib/LaTech/DiscreteMath/ch1s1_propositions/ifthen2.pg +++ b/Contrib/LaTech/DiscreteMath/ch1s1_propositions/ifthen2.pg @@ -18,8 +18,8 @@ DOCUMENT(); loadMacros( "PGstandard.pl", "parserPopUp.pl", -"PGcourse.pl", -"PGML.pl" +"PGML.pl", +"PGcourse.pl" ); ## Create an array of possible statement variations @@ -40,8 +40,6 @@ $pop4 = PopUp(["Choose...",$a], 4); $pop5 = PopUp(["Choose...",$a], 5); ## Display question -TEXT(beginproblem()); - BEGIN_PGML Consider the following statement: diff --git a/Contrib/LaTech/DiscreteMath/ch1s1_propositions/prop1.pg b/Contrib/LaTech/DiscreteMath/ch1s1_propositions/prop1.pg index da3337bf2c..8411d98d8e 100644 --- a/Contrib/LaTech/DiscreteMath/ch1s1_propositions/prop1.pg +++ b/Contrib/LaTech/DiscreteMath/ch1s1_propositions/prop1.pg @@ -18,8 +18,8 @@ DOCUMENT(); loadMacros( "PGstandard.pl", "parserPopUp.pl", -"PGcourse.pl", -"PGML.pl" +"PGML.pl", +"PGcourse.pl" ); ## Do not reveal partial solutions for True/False questions. @@ -38,8 +38,6 @@ $popTrue = PopUp(["Choose...","T","F"], 1); $popFalse = PopUp(["Choose...","T","F"], 2); ## Display question -TEXT(beginproblem()); - BEGIN_PGML Determine the truth value of the following statements. *To discourage random guessing, you must answer all problems correctly to receive credit.* diff --git a/Contrib/LaTech/DiscreteMath/ch1s2_statements/truthtable1.pg b/Contrib/LaTech/DiscreteMath/ch1s2_statements/truthtable1.pg index ca52ae451a..99f125ffb4 100644 --- a/Contrib/LaTech/DiscreteMath/ch1s2_statements/truthtable1.pg +++ b/Contrib/LaTech/DiscreteMath/ch1s2_statements/truthtable1.pg @@ -18,8 +18,8 @@ loadMacros( "PGstandard.pl", "parserPopUp.pl", "niceTables.pl", -"PGcourse.pl", -"PGML.pl" +"PGML.pl", +"PGcourse.pl" ); ## Do not reveal partial solutions for True/False questions. @@ -30,8 +30,6 @@ $popTrue = PopUp(["Choose...","T","F"], 1); $popFalse = PopUp(["Choose...","T","F"], 2); ## Display question -TEXT(beginproblem()); - BEGIN_PGML Complete the following truth table. diff --git a/Contrib/LaTech/DiscreteMath/ch1s2_statements/truthtable2.pg b/Contrib/LaTech/DiscreteMath/ch1s2_statements/truthtable2.pg index b5a759d575..298541f61f 100644 --- a/Contrib/LaTech/DiscreteMath/ch1s2_statements/truthtable2.pg +++ b/Contrib/LaTech/DiscreteMath/ch1s2_statements/truthtable2.pg @@ -18,8 +18,8 @@ loadMacros( "PGstandard.pl", "parserPopUp.pl", "niceTables.pl", -"PGcourse.pl", -"PGML.pl" +"PGML.pl", +"PGcourse.pl" ); ## Do not reveal partial solutions for True/False questions. @@ -30,8 +30,6 @@ $popTrue = PopUp(["Choose...","T","F"], 1); $popFalse = PopUp(["Choose...","T","F"], 2); ## Display question -TEXT(beginproblem()); - BEGIN_PGML Complete the following truth table. diff --git a/Contrib/LaTech/DiscreteMath/ch1s2_statements/truthtable3.pg b/Contrib/LaTech/DiscreteMath/ch1s2_statements/truthtable3.pg index 2c8a0e9bea..20ad52a0e8 100644 --- a/Contrib/LaTech/DiscreteMath/ch1s2_statements/truthtable3.pg +++ b/Contrib/LaTech/DiscreteMath/ch1s2_statements/truthtable3.pg @@ -18,8 +18,8 @@ loadMacros( "PGstandard.pl", "parserPopUp.pl", "niceTables.pl", -"PGcourse.pl", -"PGML.pl" +"PGML.pl", +"PGcourse.pl" ); ## Do not reveal partial solutions for True/False questions. @@ -30,8 +30,6 @@ $popTrue = PopUp(["Choose...","T","F"], 1); $popFalse = PopUp(["Choose...","T","F"], 2); ## Display question -TEXT(beginproblem()); - BEGIN_PGML Complete the following truth table. diff --git a/Contrib/LaTech/DiscreteMath/ch1s2_statements/truthtable4.pg b/Contrib/LaTech/DiscreteMath/ch1s2_statements/truthtable4.pg index 53217b390f..4f8f28dd16 100644 --- a/Contrib/LaTech/DiscreteMath/ch1s2_statements/truthtable4.pg +++ b/Contrib/LaTech/DiscreteMath/ch1s2_statements/truthtable4.pg @@ -18,8 +18,8 @@ loadMacros( "PGstandard.pl", "parserPopUp.pl", "niceTables.pl", -"PGcourse.pl", -"PGML.pl" +"PGML.pl", +"PGcourse.pl" ); ## Do not reveal partial solutions for True/False questions. @@ -30,8 +30,6 @@ $popTrue = PopUp(["Choose...","T","F"], 1); $popFalse = PopUp(["Choose...","T","F"], 2); ## Display question -TEXT(beginproblem()); - BEGIN_PGML Complete the following truth table. diff --git a/Contrib/LaTech/DiscreteMath/ch1s2_statements/truthtable5.pg b/Contrib/LaTech/DiscreteMath/ch1s2_statements/truthtable5.pg index c82779b04d..c25438f136 100644 --- a/Contrib/LaTech/DiscreteMath/ch1s2_statements/truthtable5.pg +++ b/Contrib/LaTech/DiscreteMath/ch1s2_statements/truthtable5.pg @@ -18,8 +18,8 @@ loadMacros( "PGstandard.pl", "parserPopUp.pl", "niceTables.pl", -"PGcourse.pl", -"PGML.pl" +"PGML.pl", +"PGcourse.pl" ); ## Do not reveal partial solutions for True/False questions. @@ -30,8 +30,6 @@ $popTrue = PopUp(["Choose...","T","F"], 1); $popFalse = PopUp(["Choose...","T","F"], 2); ## Display question -TEXT(beginproblem()); - BEGIN_PGML Complete the following truth table. diff --git a/Contrib/LaTech/DiscreteMath/ch1s2_statements/truthtable6.pg b/Contrib/LaTech/DiscreteMath/ch1s2_statements/truthtable6.pg index bd3a98108c..637ee72a96 100644 --- a/Contrib/LaTech/DiscreteMath/ch1s2_statements/truthtable6.pg +++ b/Contrib/LaTech/DiscreteMath/ch1s2_statements/truthtable6.pg @@ -18,8 +18,8 @@ loadMacros( "PGstandard.pl", "parserPopUp.pl", "niceTables.pl", -"PGcourse.pl", -"PGML.pl" +"PGML.pl", +"PGcourse.pl" ); ## Do not reveal partial solutions for True/False questions. @@ -30,8 +30,6 @@ $popTrue = PopUp(["Choose...","T","F"], 1); $popFalse = PopUp(["Choose...","T","F"], 2); ## Display question -TEXT(beginproblem()); - BEGIN_PGML Complete the following truth table. diff --git a/Contrib/LaTech/DiscreteMath/ch1s2_statements/truthtable7.pg b/Contrib/LaTech/DiscreteMath/ch1s2_statements/truthtable7.pg index 23767520e0..7054f090f9 100644 --- a/Contrib/LaTech/DiscreteMath/ch1s2_statements/truthtable7.pg +++ b/Contrib/LaTech/DiscreteMath/ch1s2_statements/truthtable7.pg @@ -18,8 +18,8 @@ loadMacros( "PGstandard.pl", "parserPopUp.pl", "niceTables.pl", -"PGcourse.pl", -"PGML.pl" +"PGML.pl", +"PGcourse.pl" ); ## Do not reveal partial solutions for True/False questions. @@ -30,8 +30,6 @@ $popTrue = PopUp(["Choose...","T","F"], 1); $popFalse = PopUp(["Choose...","T","F"], 2); ## Display question -TEXT(beginproblem()); - BEGIN_PGML Complete the following truth table. diff --git a/Contrib/LaTech/DiscreteMath/ch1s2_statements/truthtable8.pg b/Contrib/LaTech/DiscreteMath/ch1s2_statements/truthtable8.pg index bcc6e450e1..6eebe9d33c 100644 --- a/Contrib/LaTech/DiscreteMath/ch1s2_statements/truthtable8.pg +++ b/Contrib/LaTech/DiscreteMath/ch1s2_statements/truthtable8.pg @@ -18,8 +18,8 @@ loadMacros( "PGstandard.pl", "parserPopUp.pl", "niceTables.pl", -"PGcourse.pl", -"PGML.pl" +"PGML.pl", +"PGcourse.pl" ); ## Do not reveal partial solutions for True/False questions. @@ -30,8 +30,6 @@ $popTrue = PopUp(["Choose...","T","F"], 1); $popFalse = PopUp(["Choose...","T","F"], 2); ## Display question -TEXT(beginproblem()); - BEGIN_PGML Complete the following truth table. diff --git a/Contrib/LaTech/DiscreteMath/ch1s3_quantifiers/quantifiers1.pg b/Contrib/LaTech/DiscreteMath/ch1s3_quantifiers/quantifiers1.pg index 24e62d451f..bc894cdc51 100644 --- a/Contrib/LaTech/DiscreteMath/ch1s3_quantifiers/quantifiers1.pg +++ b/Contrib/LaTech/DiscreteMath/ch1s3_quantifiers/quantifiers1.pg @@ -18,8 +18,8 @@ DOCUMENT(); loadMacros( "PGstandard.pl", "parserPopUp.pl", -"PGcourse.pl", -"PGML.pl" +"PGML.pl", +"PGcourse.pl" ); ## Create an array of possible statement variations @@ -40,8 +40,6 @@ $pop4 = PopUp(["Choose...",$a], 4); $pop5 = PopUp(["Choose...",$a], 5); ## Display question -TEXT(beginproblem()); - BEGIN_PGML Consider the open statement *C(x,y): "Student x has taken math course y,"* where the domain for [``x``] is all students at your school and the domain for [``y``] is all math courses at your school. diff --git a/Contrib/LaTech/DiscreteMath/ch1s3_quantifiers/quantifiers2.pg b/Contrib/LaTech/DiscreteMath/ch1s3_quantifiers/quantifiers2.pg index 27aefb3781..8d201565d4 100644 --- a/Contrib/LaTech/DiscreteMath/ch1s3_quantifiers/quantifiers2.pg +++ b/Contrib/LaTech/DiscreteMath/ch1s3_quantifiers/quantifiers2.pg @@ -17,8 +17,8 @@ DOCUMENT(); loadMacros( "PGstandard.pl", "parserPopUp.pl", -"PGcourse.pl", -"PGML.pl" +"PGML.pl", +"PGcourse.pl" ); ## Do not reveal partial solutions for True/False questions. @@ -29,8 +29,6 @@ $popTrue = PopUp(["Choose...","T","F"], 1); $popFalse = PopUp(["Choose...","T","F"], 2); ## Display question -TEXT(beginproblem()); - BEGIN_PGML Suppose the domain for all variables is all real numbers. Determine the truth value of the following statements. diff --git a/Contrib/LaTech/DiscreteMath/ch1s3_quantifiers/quantifiers3.pg b/Contrib/LaTech/DiscreteMath/ch1s3_quantifiers/quantifiers3.pg index 5d8a81ff17..23c0211c89 100644 --- a/Contrib/LaTech/DiscreteMath/ch1s3_quantifiers/quantifiers3.pg +++ b/Contrib/LaTech/DiscreteMath/ch1s3_quantifiers/quantifiers3.pg @@ -17,8 +17,8 @@ DOCUMENT(); loadMacros( "PGstandard.pl", "parserPopUp.pl", -"PGcourse.pl", -"PGML.pl" +"PGML.pl", +"PGcourse.pl" ); ## Do not reveal partial solutions for True/False questions. @@ -29,8 +29,6 @@ $popTrue = PopUp(["Choose...","T","F"], 1); $popFalse = PopUp(["Choose...","T","F"], 2); ## Display question -TEXT(beginproblem()); - BEGIN_PGML Suppose the domain for all variables is all real numbers. Determine the truth value of the following statements. diff --git a/Contrib/LaTech/DiscreteMath/ch1s4_rulesofinference/roi1.pg b/Contrib/LaTech/DiscreteMath/ch1s4_rulesofinference/roi1.pg index 8e212191a0..cca2f51cd1 100644 --- a/Contrib/LaTech/DiscreteMath/ch1s4_rulesofinference/roi1.pg +++ b/Contrib/LaTech/DiscreteMath/ch1s4_rulesofinference/roi1.pg @@ -20,9 +20,9 @@ DOCUMENT(); loadMacros( "PGstandard.pl", "parserPopUp.pl", -"PGcourse.pl", "niceTables.pl", -"PGML.pl" +"PGML.pl", +"PGcourse.pl" ); ## Create an array of possible reasons @@ -44,8 +44,6 @@ $popStep1 = PopUp(["Choose...",$a], 2); $popStep23 = PopUp(["Choose...",$a], 9); ## Display question -TEXT(beginproblem()); - BEGIN_PGML Consider the following premises and conclusion. diff --git a/Contrib/LaTech/DiscreteMath/ch1s4_rulesofinference/roi2.pg b/Contrib/LaTech/DiscreteMath/ch1s4_rulesofinference/roi2.pg index ac548d6ee3..e9b3fb16d3 100644 --- a/Contrib/LaTech/DiscreteMath/ch1s4_rulesofinference/roi2.pg +++ b/Contrib/LaTech/DiscreteMath/ch1s4_rulesofinference/roi2.pg @@ -20,9 +20,9 @@ DOCUMENT(); loadMacros( "PGstandard.pl", "parserPopUp.pl", -"PGcourse.pl", "niceTables.pl", -"PGML.pl" +"PGML.pl", +"PGcourse.pl" ); ## Create an array of possible reasons @@ -44,8 +44,6 @@ $popStep12 = PopUp(["Choose...",$a], 6); $popStep34 = PopUp(["Choose...",$a], 11); ## Display question -TEXT(beginproblem()); - BEGIN_PGML Consider the following premises and conclusion. diff --git a/Contrib/LaTech/DiscreteMath/ch1s4_rulesofinference/roi3.pg b/Contrib/LaTech/DiscreteMath/ch1s4_rulesofinference/roi3.pg index 622f7932d1..58e27993d2 100644 --- a/Contrib/LaTech/DiscreteMath/ch1s4_rulesofinference/roi3.pg +++ b/Contrib/LaTech/DiscreteMath/ch1s4_rulesofinference/roi3.pg @@ -20,9 +20,9 @@ DOCUMENT(); loadMacros( "PGstandard.pl", "parserPopUp.pl", -"PGcourse.pl", "niceTables.pl", -"PGML.pl" +"PGML.pl", +"PGcourse.pl" ); ## Create an array of possible reasons @@ -49,8 +49,6 @@ $popStep23 = PopUp(["Choose...",$a], 7); $popStep45 = PopUp(["Choose...",$a], 13); ## Display question -TEXT(beginproblem()); - BEGIN_PGML Consider the following premises and conclusion. diff --git a/Contrib/LaTech/DiscreteMath/ch1s4_rulesofinference/roi4.pg b/Contrib/LaTech/DiscreteMath/ch1s4_rulesofinference/roi4.pg index 6e26815e70..197de1fc90 100644 --- a/Contrib/LaTech/DiscreteMath/ch1s4_rulesofinference/roi4.pg +++ b/Contrib/LaTech/DiscreteMath/ch1s4_rulesofinference/roi4.pg @@ -20,9 +20,9 @@ DOCUMENT(); loadMacros( "PGstandard.pl", "parserPopUp.pl", -"PGcourse.pl", "niceTables.pl", -"PGML.pl" +"PGML.pl", +"PGcourse.pl" ); ## Create an array of possible reasons @@ -50,8 +50,6 @@ $popStep45 = PopUp(["Choose...",$a], 12); $popStep67 = PopUp(["Choose...",$a], 15); ## Display question -TEXT(beginproblem()); - BEGIN_PGML Consider the following premises and conclusion. diff --git a/Contrib/LaTech/DiscreteMath/ch1s4_rulesofinference/roi5.pg b/Contrib/LaTech/DiscreteMath/ch1s4_rulesofinference/roi5.pg index 9d4b37d28f..ac8f3399a6 100644 --- a/Contrib/LaTech/DiscreteMath/ch1s4_rulesofinference/roi5.pg +++ b/Contrib/LaTech/DiscreteMath/ch1s4_rulesofinference/roi5.pg @@ -20,9 +20,9 @@ DOCUMENT(); loadMacros( "PGstandard.pl", "parserPopUp.pl", -"PGcourse.pl", "niceTables.pl", -"PGML.pl" +"PGML.pl", +"PGcourse.pl" ); ## Create an array of possible reasons @@ -44,8 +44,6 @@ $popStep1 = PopUp(["Choose...",$a], 2); $popStep23 = PopUp(["Choose...",$a], 9); ## Display question -TEXT(beginproblem()); - BEGIN_PGML Consider the following premises and conclusion. diff --git a/Contrib/LaTech/DiscreteMath/ch1s4_rulesofinference/roi6.pg b/Contrib/LaTech/DiscreteMath/ch1s4_rulesofinference/roi6.pg index 70e8674e6a..4b72cc2eff 100644 --- a/Contrib/LaTech/DiscreteMath/ch1s4_rulesofinference/roi6.pg +++ b/Contrib/LaTech/DiscreteMath/ch1s4_rulesofinference/roi6.pg @@ -20,9 +20,9 @@ DOCUMENT(); loadMacros( "PGstandard.pl", "parserPopUp.pl", -"PGcourse.pl", "niceTables.pl", -"PGML.pl" +"PGML.pl", +"PGcourse.pl" ); ## Create an array of possible reasons @@ -55,8 +55,6 @@ $popStep24 = PopUp(["Choose...",$a], 10); $popStep58 = PopUp(["Choose...",$a], 16); ## Display question -TEXT(beginproblem()); - BEGIN_PGML Consider the following premises and conclusion. diff --git a/Contrib/LaTech/DiscreteMath/ch1s5_proofs/proof1.pg b/Contrib/LaTech/DiscreteMath/ch1s5_proofs/proof1.pg index 369d86bc0e..03628147fb 100644 --- a/Contrib/LaTech/DiscreteMath/ch1s5_proofs/proof1.pg +++ b/Contrib/LaTech/DiscreteMath/ch1s5_proofs/proof1.pg @@ -19,9 +19,9 @@ DOCUMENT(); loadMacros( "PGstandard.pl", "parserPopUp.pl", -"PGcourse.pl", "niceTables.pl", -"PGML.pl" +"PGML.pl", +"PGcourse.pl" ); ## Create an array of possible reasons @@ -51,8 +51,6 @@ $popStep5 = PopUp(["Choose...",$a], 6); $popStep6 = PopUp(["Choose...",$a], 7); ## Display question -TEXT(beginproblem()); - BEGIN_PGML Consider the following statement to be proved. diff --git a/Contrib/LaTech/DiscreteMath/ch2s1_sets/set1.pg b/Contrib/LaTech/DiscreteMath/ch2s1_sets/set1.pg index b74a8c471a..ee92ff4a4a 100644 --- a/Contrib/LaTech/DiscreteMath/ch2s1_sets/set1.pg +++ b/Contrib/LaTech/DiscreteMath/ch2s1_sets/set1.pg @@ -17,8 +17,8 @@ DOCUMENT(); loadMacros( "PGstandard.pl", "parserPopUp.pl", -"PGcourse.pl", -"PGML.pl" +"PGML.pl", +"PGcourse.pl" ); ## Do not reveal partial solutions for True/False questions. @@ -29,8 +29,6 @@ $popTrue = PopUp(["Choose...","T","F"], 1); $popFalse = PopUp(["Choose...","T","F"], 2); ## Display question -TEXT(beginproblem()); - BEGIN_PGML Determine the truth value of the following statements. diff --git a/Contrib/LaTech/DiscreteMath/ch2s1_sets/set2.pg b/Contrib/LaTech/DiscreteMath/ch2s1_sets/set2.pg index d66d6f0658..4cd6b6a37a 100644 --- a/Contrib/LaTech/DiscreteMath/ch2s1_sets/set2.pg +++ b/Contrib/LaTech/DiscreteMath/ch2s1_sets/set2.pg @@ -17,8 +17,8 @@ DOCUMENT(); loadMacros( "PGstandard.pl", "parserPopUp.pl", -"PGcourse.pl", -"PGML.pl" +"PGML.pl", +"PGcourse.pl" ); ## Do not reveal partial solutions for True/False questions. @@ -29,8 +29,6 @@ $popTrue = PopUp(["Choose...","T","F"], 1); $popFalse = PopUp(["Choose...","T","F"], 2); ## Display question -TEXT(beginproblem()); - BEGIN_PGML Determine the truth value of the following statements. diff --git a/Contrib/LaTech/DiscreteMath/ch2s1_sets/set3.pg b/Contrib/LaTech/DiscreteMath/ch2s1_sets/set3.pg index d6de17ec44..00fba105bf 100644 --- a/Contrib/LaTech/DiscreteMath/ch2s1_sets/set3.pg +++ b/Contrib/LaTech/DiscreteMath/ch2s1_sets/set3.pg @@ -17,8 +17,8 @@ DOCUMENT(); loadMacros( "PGstandard.pl", "parserPopUp.pl", -"PGcourse.pl", -"PGML.pl" +"PGML.pl", +"PGcourse.pl" ); ## Do not reveal partial solutions for True/False questions. @@ -29,8 +29,6 @@ $popTrue = PopUp(["Choose...","T","F"], 1); $popFalse = PopUp(["Choose...","T","F"], 2); ## Display question -TEXT(beginproblem()); - BEGIN_PGML Recall the following commonly used sets. diff --git a/Contrib/LaTech/DiscreteMath/ch2s1_sets/setsize1.pg b/Contrib/LaTech/DiscreteMath/ch2s1_sets/setsize1.pg index a1a9861df4..5b20ff5a85 100644 --- a/Contrib/LaTech/DiscreteMath/ch2s1_sets/setsize1.pg +++ b/Contrib/LaTech/DiscreteMath/ch2s1_sets/setsize1.pg @@ -16,8 +16,8 @@ DOCUMENT(); ## Load libraries loadMacros( "PGstandard.pl", -"PGcourse.pl", -"PGML.pl" +"PGML.pl", +"PGcourse.pl" ); ## Create parameters and solutions to predetermined problems @@ -39,8 +39,6 @@ $p = random(9,15,1); $size5 = $p - $n5 - 1; ## Display question -TEXT(beginproblem()); - BEGIN_PGML Compute the size of the following sets. diff --git a/Contrib/LaTech/DiscreteMath/ch2s1_sets/setsize2.pg b/Contrib/LaTech/DiscreteMath/ch2s1_sets/setsize2.pg index 60fd378ce0..1ee974ef3f 100644 --- a/Contrib/LaTech/DiscreteMath/ch2s1_sets/setsize2.pg +++ b/Contrib/LaTech/DiscreteMath/ch2s1_sets/setsize2.pg @@ -17,8 +17,8 @@ DOCUMENT(); ## Load libraries loadMacros( "PGstandard.pl", -"PGcourse.pl", -"PGML.pl" +"PGML.pl", +"PGcourse.pl" ); ## Create parameters and solutions to predetermined problems @@ -33,8 +33,6 @@ $i = random(7,12,1); $p = $primes[$i-1]; ## Display question -TEXT(beginproblem()); - BEGIN_PGML Compute the size of the following sets. (In this context, [` \mathbb{N} `] is the set of natural numbers, [` \mathbb{Z} `] is the set of integers, [` \mathbb{P} `] is the set of prime numbers, and 0 is not considered a natural number.) diff --git a/Contrib/LaTech/DiscreteMath/ch2s2_setoperations/setops1.pg b/Contrib/LaTech/DiscreteMath/ch2s2_setoperations/setops1.pg index 8898129334..0730fe6008 100644 --- a/Contrib/LaTech/DiscreteMath/ch2s2_setoperations/setops1.pg +++ b/Contrib/LaTech/DiscreteMath/ch2s2_setoperations/setops1.pg @@ -19,8 +19,8 @@ DOCUMENT(); loadMacros( "PGstandard.pl", "MathObjects.pl", -"PGcourse.pl", -"PGML.pl" +"PGML.pl", +"PGcourse.pl" ); ## Set the context for sets and intervals @@ -49,8 +49,6 @@ $AcapofDcupE = $A->intersect($DcupE); Context()->operators->undefine("-"); ## Display question -TEXT(beginproblem()); - BEGIN_PGML Consider the following sets. diff --git a/Contrib/LaTech/DiscreteMath/ch2s2_setoperations/setops2.pg b/Contrib/LaTech/DiscreteMath/ch2s2_setoperations/setops2.pg index 0b316fb0f5..2869091c11 100644 --- a/Contrib/LaTech/DiscreteMath/ch2s2_setoperations/setops2.pg +++ b/Contrib/LaTech/DiscreteMath/ch2s2_setoperations/setops2.pg @@ -18,8 +18,8 @@ DOCUMENT(); loadMacros( "PGstandard.pl", "MathObjects.pl", -"PGcourse.pl", -"PGML.pl" +"PGML.pl", +"PGcourse.pl" ); ## Set the context for sets and intervals @@ -53,8 +53,6 @@ $AcapofDcupE = $A->intersect($DcupE); Context()->operators->undefine("-"); ## Display question -TEXT(beginproblem()); - BEGIN_PGML Consider the following sets. diff --git a/Contrib/LaTech/DiscreteMath/ch2s2_setoperations/setops3.pg b/Contrib/LaTech/DiscreteMath/ch2s2_setoperations/setops3.pg index a073157d0b..48daa3f5ea 100644 --- a/Contrib/LaTech/DiscreteMath/ch2s2_setoperations/setops3.pg +++ b/Contrib/LaTech/DiscreteMath/ch2s2_setoperations/setops3.pg @@ -18,8 +18,8 @@ DOCUMENT(); loadMacros( "PGstandard.pl", "MathObjects.pl", -"PGcourse.pl", -"PGML.pl" +"PGML.pl", +"PGcourse.pl" ); ## Set the context for sets and intervals @@ -54,8 +54,6 @@ $AcrossC = List(Point($n1,$n1),Point($n1,$n2),Point($n1,$n3),Point($n1,$n4),Poin $CcrossA = List(Point($n1,$n1),Point($n1,$n2),Point($n2,$n1),Point($n2,$n2),Point($n3,$n1),Point($n3,$n2),Point($n4,$n1),Point($n4,$n2)); ## Display question -TEXT(beginproblem()); - BEGIN_PGML Consider the following sets. diff --git a/Contrib/LaTech/DiscreteMath/ch2s2_setoperations/setops4.pg b/Contrib/LaTech/DiscreteMath/ch2s2_setoperations/setops4.pg index 21a570646e..c0f153e0c6 100644 --- a/Contrib/LaTech/DiscreteMath/ch2s2_setoperations/setops4.pg +++ b/Contrib/LaTech/DiscreteMath/ch2s2_setoperations/setops4.pg @@ -18,8 +18,8 @@ DOCUMENT(); loadMacros( "PGstandard.pl", "parserRadioButtons.pl", -"PGcourse.pl", -"PGML.pl" +"PGML.pl", +"PGcourse.pl" ); ## Create an array of possible answers @@ -41,8 +41,6 @@ $radio4 = RadioButtons([$a,"None of the other choices."], 3); $radio5 = RadioButtons([$a,"None of the other choices."], 4); ## Display question -TEXT(beginproblem()); - BEGIN_PGML Choose the correct set that corresponds to the operation given below. (The universal set is all real numbers.) diff --git a/Contrib/LaTech/DiscreteMath/ch2s2_setoperations/setops5.pg b/Contrib/LaTech/DiscreteMath/ch2s2_setoperations/setops5.pg index 9b65181c1a..82f2ac3282 100644 --- a/Contrib/LaTech/DiscreteMath/ch2s2_setoperations/setops5.pg +++ b/Contrib/LaTech/DiscreteMath/ch2s2_setoperations/setops5.pg @@ -18,8 +18,8 @@ DOCUMENT(); loadMacros( "PGstandard.pl", "parserRadioButtons.pl", -"PGcourse.pl", -"PGML.pl" +"PGML.pl", +"PGcourse.pl" ); ## Create an array of possible answers @@ -38,8 +38,6 @@ $radio3 = RadioButtons([$a,"None of the other choices."], 2); $radio4 = RadioButtons([$a,"None of the other choices."], 3); ## Display question -TEXT(beginproblem()); - BEGIN_PGML Choose the correct set that corresponds to the operation given below. (The universal set is all real numbers.) diff --git a/Contrib/LaTech/DiscreteMath/ch2s3_functions/fun1.pg b/Contrib/LaTech/DiscreteMath/ch2s3_functions/fun1.pg index 7b334dd701..c7f2fdc988 100644 --- a/Contrib/LaTech/DiscreteMath/ch2s3_functions/fun1.pg +++ b/Contrib/LaTech/DiscreteMath/ch2s3_functions/fun1.pg @@ -17,8 +17,8 @@ DOCUMENT(); loadMacros( "PGstandard.pl", "MathObjects.pl", -"PGcourse.pl", -"PGML.pl" +"PGML.pl", +"PGcourse.pl" ); ## Set the context for sets and intervals @@ -32,8 +32,6 @@ $ans4 = Interval("[0,1)"); $ans5 = Interval("[-1,1)"); ## Display question -TEXT(beginproblem()); - BEGIN_PGML Consider the function [`` g:\mathbb{R} \to \mathbb{R}``] given by [`` g(x)=\text{floor}(x) ``]. (Recall that the ceiling function rounds a number up to the nearest integer and that [`` \mathbb{R} ``] represents the set of all real numbers.) diff --git a/Contrib/LaTech/DiscreteMath/ch2s3_functions/fun2.pg b/Contrib/LaTech/DiscreteMath/ch2s3_functions/fun2.pg index e4bc62dbe1..fdb8e9f018 100644 --- a/Contrib/LaTech/DiscreteMath/ch2s3_functions/fun2.pg +++ b/Contrib/LaTech/DiscreteMath/ch2s3_functions/fun2.pg @@ -17,8 +17,8 @@ DOCUMENT(); loadMacros( "PGstandard.pl", "MathObjects.pl", -"PGcourse.pl", -"PGML.pl" +"PGML.pl", +"PGcourse.pl" ); ## Set the context for sets and intervals @@ -32,8 +32,6 @@ $ans4 = Interval("(-1,0]"); $ans5 = Interval("(-1,1]"); ## Display question -TEXT(beginproblem()); - BEGIN_PGML Consider the function [`` g:\mathbb{R} \to \mathbb{R}``] given by [`` g(x)=\text{ceil}(x) ``]. (Recall that the ceiling function rounds a number up to the nearest integer and that [`` \mathbb{R} ``] represents the set of all real numbers.) diff --git a/Contrib/LaTech/DiscreteMath/ch2s3_functions/fun3.pg b/Contrib/LaTech/DiscreteMath/ch2s3_functions/fun3.pg index 0be0e0f45f..5d6bf795b6 100644 --- a/Contrib/LaTech/DiscreteMath/ch2s3_functions/fun3.pg +++ b/Contrib/LaTech/DiscreteMath/ch2s3_functions/fun3.pg @@ -17,8 +17,8 @@ DOCUMENT(); loadMacros( "PGstandard.pl", "MathObjects.pl", -"PGcourse.pl", -"PGML.pl" +"PGML.pl", +"PGcourse.pl" ); ## Set the context for sets and intervals @@ -32,8 +32,6 @@ $ans4 = Interval("(-1,1)"); $ans5 = Interval("(-infinity,-2]U[2,infinity)"); ## Display question -TEXT(beginproblem()); - BEGIN_PGML Consider the function [`` f:\mathbb{R} \to \mathbb{R}``] given by [`` f(x) = x^{2} ``]. (Recall that [`` \mathbb{R} ``] represents the set of all real numbers.) diff --git a/Contrib/LaTech/DiscreteMath/ch3s4_recurrencerelations/recrel1.pg b/Contrib/LaTech/DiscreteMath/ch3s4_recurrencerelations/recrel1.pg index 1367904a61..e179596ef7 100644 --- a/Contrib/LaTech/DiscreteMath/ch3s4_recurrencerelations/recrel1.pg +++ b/Contrib/LaTech/DiscreteMath/ch3s4_recurrencerelations/recrel1.pg @@ -17,12 +17,14 @@ DOCUMENT(); ## Load libraries -loadMacros("PGstandard.pl", - "MathObjects.pl", - "parserMultiAnswer.pl", - "PGML.pl", - "PGcourse.pl", - "contextFraction.pl"); +loadMacros( +"PGstandard.pl", +"MathObjects.pl", +"parserMultiAnswer.pl", +"PGML.pl", +"contextFraction.pl", +"PGcourse.pl" +); ## Set the context: no decimal input, absolute tolerance, variable "n", and integer test points for answer checker Context("Fraction-NoDecimals"); @@ -71,8 +73,6 @@ $ans = MultiAnswer($y1, $y2)->with( ## Display problem -TEXT(beginproblem()); - BEGIN_PGML For the recurrence relation: @@ -102,4 +102,4 @@ Given the initial conditions [`` a_{0} = [$c] ``] and [`` a_{1} = [$d] ``], the END_PGML_SOLUTION -ENDDOCUMENT(); \ No newline at end of file +ENDDOCUMENT(); diff --git a/Contrib/LaTech/DiscreteMath/ch3s4_recurrencerelations/recrel2.pg b/Contrib/LaTech/DiscreteMath/ch3s4_recurrencerelations/recrel2.pg index 3543247f91..cd0c2bdf33 100644 --- a/Contrib/LaTech/DiscreteMath/ch3s4_recurrencerelations/recrel2.pg +++ b/Contrib/LaTech/DiscreteMath/ch3s4_recurrencerelations/recrel2.pg @@ -17,12 +17,14 @@ DOCUMENT(); ## Load libraries -loadMacros("PGstandard.pl", - "MathObjects.pl", - "parserMultiAnswer.pl", - "PGML.pl", - "PGcourse.pl", - "contextFraction.pl"); +loadMacros( +"PGstandard.pl", +"MathObjects.pl", +"parserMultiAnswer.pl", +"PGML.pl", +"contextFraction.pl", +"PGcourse.pl" +); ## Set the context: no decimal input, absolute tolerance, variable "n", and integer test points for answer checker Context("Fraction-NoDecimals"); @@ -70,8 +72,6 @@ $ans = MultiAnswer($y1, $y2)->with( ## Display problem -TEXT(beginproblem()); - BEGIN_PGML For the recurrence relation: @@ -101,4 +101,4 @@ Given the initial conditions [`` a_{0} = [$c] ``] and [`` a_{1} = [$d] ``], the END_PGML_SOLUTION -ENDDOCUMENT(); \ No newline at end of file +ENDDOCUMENT(); diff --git a/Contrib/LaTech/DiscreteMath/ch3s4_recurrencerelations/recrel3.pg b/Contrib/LaTech/DiscreteMath/ch3s4_recurrencerelations/recrel3.pg index 745e407206..19030f2e42 100644 --- a/Contrib/LaTech/DiscreteMath/ch3s4_recurrencerelations/recrel3.pg +++ b/Contrib/LaTech/DiscreteMath/ch3s4_recurrencerelations/recrel3.pg @@ -16,11 +16,13 @@ DOCUMENT(); ## Load libraries -loadMacros("PGstandard.pl", - "MathObjects.pl", - "PGML.pl", - "PGcourse.pl", - "contextFraction.pl"); +loadMacros( +"PGstandard.pl", +"MathObjects.pl", +"PGML.pl", +"contextFraction.pl", +"PGcourse.pl" +); ## Set the context: no decimal input, absolute tolerance, variable "n", and integer test points for answer checker Context("Fraction-NoDecimals"); @@ -51,8 +53,6 @@ $s = ($A*$n + $B)->reduce; $y = ($c1*$y1 + $s)->reduce; ## Display problem -TEXT(beginproblem()); - BEGIN_PGML For the recurrence relation: @@ -83,4 +83,4 @@ Given the initial condition [`` a_{0} = [$c] ``] and solving for [`` c_{1} ``], END_PGML_SOLUTION -ENDDOCUMENT(); \ No newline at end of file +ENDDOCUMENT(); diff --git a/Contrib/LaTech/DiscreteMath/ch3s4_recurrencerelations/recrel4.pg b/Contrib/LaTech/DiscreteMath/ch3s4_recurrencerelations/recrel4.pg index f52e020f72..31be12940c 100644 --- a/Contrib/LaTech/DiscreteMath/ch3s4_recurrencerelations/recrel4.pg +++ b/Contrib/LaTech/DiscreteMath/ch3s4_recurrencerelations/recrel4.pg @@ -16,11 +16,13 @@ DOCUMENT(); ## Load libraries -loadMacros("PGstandard.pl", - "MathObjects.pl", - "PGML.pl", - "PGcourse.pl", - "contextFraction.pl"); +loadMacros( +"PGstandard.pl", +"MathObjects.pl", +"PGML.pl", +"contextFraction.pl", +"PGcourse.pl" +); ## Set the context: no decimal input, absolute tolerance, variable "n", and integer test points for answer checker Context("Fraction-NoDecimals"); @@ -52,8 +54,6 @@ $s = ($A*($p**$n))->reduce; $y = ($c1*$y1 + $s)->reduce; ## Display problem -TEXT(beginproblem()); - BEGIN_PGML For the recurrence relation: @@ -83,4 +83,4 @@ Given the initial condition [`` a_{0} = [$c] ``] and solving for [`` c_{1} ``], END_PGML_SOLUTION -ENDDOCUMENT(); \ No newline at end of file +ENDDOCUMENT(); diff --git a/Contrib/LaTech/DiscreteMath/ch4As1_matrices/boolmatrix1.pg b/Contrib/LaTech/DiscreteMath/ch4As1_matrices/boolmatrix1.pg index 65799a4827..7a270d86ee 100644 --- a/Contrib/LaTech/DiscreteMath/ch4As1_matrices/boolmatrix1.pg +++ b/Contrib/LaTech/DiscreteMath/ch4As1_matrices/boolmatrix1.pg @@ -17,8 +17,8 @@ DOCUMENT(); loadMacros( "PGstandard.pl", "MathObjects.pl", -"PGcourse.pl", -"PGML.pl" +"PGML.pl", +"PGcourse.pl" ); ## Set the context for matrices @@ -58,8 +58,6 @@ $join = Matrix([ ]); ## Display question -TEXT(beginproblem()); - BEGIN_PGML For the matrices [` A = [$A] `] and [` B = [$B] `], their meet is: diff --git a/Contrib/LaTech/DiscreteMath/ch4As1_matrices/boolmatrix2.pg b/Contrib/LaTech/DiscreteMath/ch4As1_matrices/boolmatrix2.pg index 38a18913d6..b2251ec566 100644 --- a/Contrib/LaTech/DiscreteMath/ch4As1_matrices/boolmatrix2.pg +++ b/Contrib/LaTech/DiscreteMath/ch4As1_matrices/boolmatrix2.pg @@ -17,8 +17,8 @@ DOCUMENT(); loadMacros( "PGstandard.pl", "MathObjects.pl", -"PGcourse.pl", -"PGML.pl" +"PGML.pl", +"PGcourse.pl" ); ## Set the context for matrices @@ -40,7 +40,11 @@ $B = Matrix([ ## Create their boolean product for my $i (1..3) { for my $j (1..3) { - $temp[$i][$j] = min(($A->row($i)*$B->column($j))->element(1,1), 1); + my $sum = 0; + for my $k (1..3) { + $sum += $A->element($i,$k) * $B->element($k,$j); + } + $temp[$i][$j] = min($sum, 1); } } @@ -52,8 +56,6 @@ $prod = Matrix([ ## Display question -TEXT(beginproblem()); - BEGIN_PGML For the matrices [` A = [$A] `] and [` B = [$B] `], their boolean product is: diff --git a/Contrib/LaTech/DiscreteMath/ch4As3_relations/boolmatrixrep1.pg b/Contrib/LaTech/DiscreteMath/ch4As3_relations/boolmatrixrep1.pg index 749d8b6f25..edb844bd6c 100644 --- a/Contrib/LaTech/DiscreteMath/ch4As3_relations/boolmatrixrep1.pg +++ b/Contrib/LaTech/DiscreteMath/ch4As3_relations/boolmatrixrep1.pg @@ -18,8 +18,8 @@ DOCUMENT(); loadMacros( "PGstandard.pl", "MathObjects.pl", -"PGcourse.pl", -"PGML.pl" +"PGML.pl", +"PGcourse.pl" ); ## Set the context for matrices @@ -59,8 +59,6 @@ $join = Matrix([ ]); ## Display question -TEXT(beginproblem()); - BEGIN_PGML Suppose the matrix representation for relations [` R `] and [` S `] are [` M_{R} = [$A] `] and [` M_{S} = [$B] `]. Compute the matrix represenation for [` M_{R \cap S} `] and [` M_{R \cup S} `]. diff --git a/Contrib/LaTech/DiscreteMath/ch4As3_relations/boolmatrixrep2.pg b/Contrib/LaTech/DiscreteMath/ch4As3_relations/boolmatrixrep2.pg index 095bb92965..41f13ad740 100644 --- a/Contrib/LaTech/DiscreteMath/ch4As3_relations/boolmatrixrep2.pg +++ b/Contrib/LaTech/DiscreteMath/ch4As3_relations/boolmatrixrep2.pg @@ -18,8 +18,8 @@ DOCUMENT(); loadMacros( "PGstandard.pl", "MathObjects.pl", -"PGcourse.pl", -"PGML.pl" +"PGML.pl", +"PGcourse.pl" ); ## Set the context for matrices @@ -41,7 +41,11 @@ $B = Matrix([ ## Create their boolean product for my $i (1..3) { for my $j (1..3) { - $temp[$i][$j] = min(($A->row($i)*$B->column($j))->element(1,1), 1); + my $sum = 0; + for my $k (1..3) { + $sum += $A->element($i,$k) * $B->element($k,$j); + } + $temp[$i][$j] = min($sum, 1); } } @@ -53,8 +57,6 @@ $prod = Matrix([ ## Display question -TEXT(beginproblem()); - BEGIN_PGML Suppose the matrix representation for relations [` R `] and [` S `] are [` M_{R} = [$A] `] and [` M_{S} = [$B] `]. Compute the matrix represenation for [` M_{S \circ R} `]. diff --git a/Contrib/LaTech/DiscreteMath/ch4As3_relations/boolmatrixrep3.pg b/Contrib/LaTech/DiscreteMath/ch4As3_relations/boolmatrixrep3.pg index ebeecc82f8..053cd06f29 100644 --- a/Contrib/LaTech/DiscreteMath/ch4As3_relations/boolmatrixrep3.pg +++ b/Contrib/LaTech/DiscreteMath/ch4As3_relations/boolmatrixrep3.pg @@ -18,8 +18,8 @@ DOCUMENT(); loadMacros( "PGstandard.pl", "MathObjects.pl", -"PGcourse.pl", -"PGML.pl" +"PGML.pl", +"PGcourse.pl" ); ## Set the context for matrices @@ -46,8 +46,6 @@ $comp = $ones - $A; ## Display question -TEXT(beginproblem()); - BEGIN_PGML Suppose the matrix representation for relation [` R `] is [` M_{R} = [$A] `]. Compute the matrix represenation for the inverse relation [` M_{R^{-1}} `] and the complement relation [` M_{\overline{R}} `]. diff --git a/Contrib/LaTech/DiscreteMath/ch4Cs1_stringslanguages/strings_language1.pg b/Contrib/LaTech/DiscreteMath/ch4Cs1_stringslanguages/strings_language1.pg index ed1461442f..ba060b8db2 100644 --- a/Contrib/LaTech/DiscreteMath/ch4Cs1_stringslanguages/strings_language1.pg +++ b/Contrib/LaTech/DiscreteMath/ch4Cs1_stringslanguages/strings_language1.pg @@ -13,14 +13,13 @@ DOCUMENT(); loadMacros( - "PGstandard.pl", - "MathObjects.pl", - "PGML.pl", - "parserPopUp.pl", +"PGstandard.pl", +"MathObjects.pl", +"PGML.pl", +"parserPopUp.pl", +"PGcourse.pl" ); -TEXT(beginproblem()); - # Generate a random binary string $alphabet = "01"; $length = random(4, 8, 1); @@ -32,6 +31,7 @@ for ($i = 0; $i < $length; $i++) { $answer = ($length % 2 == 0) ? "Yes" : "No"; $popup = PopUp(['Choose...','Yes', 'No'], $answer); +# Display problem BEGIN_PGML Consider the language [`` L ``] over the alphabet [`` \{0, 1\} ``] that consists of all strings of even length. Determine if the following string belongs to [`` L ``]: @@ -40,4 +40,4 @@ String: [$string] Does the string belong to the language? [________]{$popup} END_PGML -ENDDOCUMENT(); \ No newline at end of file +ENDDOCUMENT(); diff --git a/Contrib/LaTech/DiscreteMath/ch4Cs1_stringslanguages/strings_language2.pg b/Contrib/LaTech/DiscreteMath/ch4Cs1_stringslanguages/strings_language2.pg index 175d7de965..6b2faff21c 100644 --- a/Contrib/LaTech/DiscreteMath/ch4Cs1_stringslanguages/strings_language2.pg +++ b/Contrib/LaTech/DiscreteMath/ch4Cs1_stringslanguages/strings_language2.pg @@ -13,14 +13,13 @@ DOCUMENT(); loadMacros( - "PGstandard.pl", - "MathObjects.pl", - "PGML.pl", - "parserPopUp.pl", +"PGstandard.pl", +"MathObjects.pl", +"PGML.pl", +"parserPopUp.pl", +"PGcourse.pl" ); -TEXT(beginproblem()); - # Generate a random binary string $alphabet = "01"; $length = random(3, 7, 1); @@ -33,6 +32,7 @@ for ($i = 1; $i < $length; $i++) { $answer = ($start eq "0") ? "Yes" : "No"; $popup = PopUp(['Choose...','Yes', 'No'], $answer); +# Display problem BEGIN_PGML Consider the language [`` L ``] over the alphabet [`` \{0, 1\} ``] that consists of all strings starting with 0. Determine if the following string belongs to [`` L ``]: @@ -41,4 +41,4 @@ String: [$string] Does the string belong to the language? [________]{$popup} END_PGML -ENDDOCUMENT(); \ No newline at end of file +ENDDOCUMENT(); diff --git a/Contrib/LaTech/DiscreteMath/ch4Cs1_stringslanguages/strings_language3.pg b/Contrib/LaTech/DiscreteMath/ch4Cs1_stringslanguages/strings_language3.pg index c1381f343a..b9c850a635 100644 --- a/Contrib/LaTech/DiscreteMath/ch4Cs1_stringslanguages/strings_language3.pg +++ b/Contrib/LaTech/DiscreteMath/ch4Cs1_stringslanguages/strings_language3.pg @@ -13,14 +13,13 @@ DOCUMENT(); loadMacros( - "PGstandard.pl", - "MathObjects.pl", - "PGML.pl", - "parserPopUp.pl", +"PGstandard.pl", +"MathObjects.pl", +"PGML.pl", +"parserPopUp.pl", +"PGcourse.pl" ); -TEXT(beginproblem()); - # Generate a random binary string $alphabet = "01"; $length = random(5, 10, 1); @@ -33,6 +32,7 @@ $one_count = () = $string =~ /1/g; $answer = ($one_count % 3 == 0) ? "Yes" : "No"; $popup = PopUp(['Choose...','Yes', 'No'], $answer); +# Display problem BEGIN_PGML Consider the language [`` L ``] over the alphabet [`` \{0, 1\} ``] that consists of all strings where the number of 1's is divisible by 3. Determine if the following string belongs to [`` L ``]: @@ -41,4 +41,4 @@ String: [$string] Does the string belong to the language? [________]{$popup} END_PGML -ENDDOCUMENT(); \ No newline at end of file +ENDDOCUMENT(); diff --git a/Contrib/LaTech/DiscreteMath/ch4Cs1_stringslanguages/strings_language4.pg b/Contrib/LaTech/DiscreteMath/ch4Cs1_stringslanguages/strings_language4.pg index 5c904366cf..90e0741bc5 100644 --- a/Contrib/LaTech/DiscreteMath/ch4Cs1_stringslanguages/strings_language4.pg +++ b/Contrib/LaTech/DiscreteMath/ch4Cs1_stringslanguages/strings_language4.pg @@ -13,13 +13,12 @@ DOCUMENT(); loadMacros( - "PGstandard.pl", - "PGML.pl", - "parserMultiAnswer.pl" +"PGstandard.pl", +"PGML.pl", +"parserMultiAnswer.pl", +"PGcourse.pl" ); -TEXT(beginproblem()); - # Enable set context with string elements Context()->strings->add("ab" => {}, "abb" => {}, "abbb" => {}); @@ -33,7 +32,7 @@ Context()->lists->set( # The correct set of strings $answer = List("ab", "abb", "abbb"); - +# Display problem BEGIN_PGML Let [`` L_{1} = \{a,ab\} ``] and [`` L_{2} = \{b,bb\} ``]. @@ -46,4 +45,4 @@ BEGIN_PGML_SOLUTION Distinct results: [`` ab,abb,abbb ``] END_PGML_SOLUTION -ENDDOCUMENT(); \ No newline at end of file +ENDDOCUMENT(); diff --git a/Contrib/LaTech/DiscreteMath/ch4Cs2_dfa/dfa1.pg b/Contrib/LaTech/DiscreteMath/ch4Cs2_dfa/dfa1.pg index c222a4015e..66e0346885 100644 --- a/Contrib/LaTech/DiscreteMath/ch4Cs2_dfa/dfa1.pg +++ b/Contrib/LaTech/DiscreteMath/ch4Cs2_dfa/dfa1.pg @@ -13,15 +13,14 @@ DOCUMENT(); loadMacros( - "PGstandard.pl", - "MathObjects.pl", - "niceTables.pl", - "PGML.pl", - "parserPopUp.pl", +"PGstandard.pl", +"MathObjects.pl", +"niceTables.pl", +"PGML.pl", +"parserPopUp.pl", +"PGcourse.pl" ); -TEXT(beginproblem()); - # Generate a random binary string $alphabet = "01"; $length = random(4, 8, 1); @@ -43,6 +42,7 @@ foreach my $char (split //, $string) { $answer = ($current_state eq "q2") ? "Accept" : "Reject"; $popup = PopUp(['Choose...','Accept', 'Reject'], $answer); +# Display problem BEGIN_PGML Consider a DFA over the alphabet \{0, 1\} that has states [` q_0 `], [` q_1 `], and [` q_2 `]. The transition table is: @@ -63,4 +63,4 @@ Given the input string [$string], what is the outcome? END_PGML -ENDDOCUMENT(); \ No newline at end of file +ENDDOCUMENT(); diff --git a/Contrib/LaTech/DiscreteMath/ch4Cs2_dfa/dfa2.pg b/Contrib/LaTech/DiscreteMath/ch4Cs2_dfa/dfa2.pg index 85a8243160..2056dba3ff 100644 --- a/Contrib/LaTech/DiscreteMath/ch4Cs2_dfa/dfa2.pg +++ b/Contrib/LaTech/DiscreteMath/ch4Cs2_dfa/dfa2.pg @@ -13,15 +13,14 @@ DOCUMENT(); loadMacros( - "PGstandard.pl", - "MathObjects.pl", - "niceTables.pl", - "PGML.pl", - "parserPopUp.pl", +"PGstandard.pl", +"MathObjects.pl", +"niceTables.pl", +"PGML.pl", +"parserPopUp.pl", +"PGcourse.pl" ); -TEXT(beginproblem()); - # Generate a random binary string $alphabet = "01"; $length = random(4, 8, 1); @@ -39,6 +38,7 @@ foreach my $char (split //, $string) { $answer = ($current_state eq "q0") ? "Accept" : "Reject"; $popup = PopUp(['Choose...','Accept', 'Reject'], $answer); +# Display problem BEGIN_PGML Consider a DFA over the alphabet \{0, 1\} that has states [` q_0 `], [` q_1 `]. The transition table is: @@ -58,4 +58,4 @@ Given the input string [$string], what is the outcome? END_PGML -ENDDOCUMENT(); \ No newline at end of file +ENDDOCUMENT(); diff --git a/Contrib/LaTech/DiscreteMath/ch4Cs2_dfa/dfa3.pg b/Contrib/LaTech/DiscreteMath/ch4Cs2_dfa/dfa3.pg index 15d3cbf8ad..7855db5a4c 100644 --- a/Contrib/LaTech/DiscreteMath/ch4Cs2_dfa/dfa3.pg +++ b/Contrib/LaTech/DiscreteMath/ch4Cs2_dfa/dfa3.pg @@ -13,11 +13,12 @@ DOCUMENT(); loadMacros( - "PGstandard.pl", - "MathObjects.pl", - "niceTables.pl", - "PGML.pl", - "parserPopUp.pl", +"PGstandard.pl", +"MathObjects.pl", +"niceTables.pl", +"PGML.pl", +"parserPopUp.pl", +"PGcourse.pl" ); TEXT(beginproblem()); @@ -43,6 +44,7 @@ foreach my $char (split //, $string) { $answer = $current_state; $popup = PopUp(['Choose...','q0', 'q1', 'q2'], $answer); +# Display problem BEGIN_PGML Consider a DFA over the alphabet \{0, 1\} with states [` q_0 `], [` q_1 `], and [` q_2 `]. The transition table is: @@ -63,4 +65,4 @@ Given the input string [$string], what is the final state? END_PGML -ENDDOCUMENT(); \ No newline at end of file +ENDDOCUMENT(); diff --git a/Contrib/LaTech/DiscreteMath/ch4Cs3_nfa/nfa1.pg b/Contrib/LaTech/DiscreteMath/ch4Cs3_nfa/nfa1.pg index 353c0f35f1..8053c17095 100644 --- a/Contrib/LaTech/DiscreteMath/ch4Cs3_nfa/nfa1.pg +++ b/Contrib/LaTech/DiscreteMath/ch4Cs3_nfa/nfa1.pg @@ -13,15 +13,14 @@ DOCUMENT(); loadMacros( - "PGstandard.pl", - "MathObjects.pl", - "niceTables.pl", - "PGML.pl", - "parserPopUp.pl", +"PGstandard.pl", +"MathObjects.pl", +"niceTables.pl", +"PGML.pl", +"parserPopUp.pl", +"PGcourse.pl" ); -TEXT(beginproblem()); - # Generate a random binary string $alphabet = "01"; $length = random(4, 8, 1); @@ -51,6 +50,7 @@ foreach my $char (split //, $string) { $answer = (grep { $_ eq "q2" } @states) ? "Accept" : "Reject"; $popup = PopUp(['Choose...','Accept', 'Reject'], $answer); +# Display problem BEGIN_PGML Consider an NFA over the alphabet \{0, 1\}. The NFA has states [` q_0 `], [` q_1 `], [` q_2 `]. The transition table is: @@ -70,4 +70,4 @@ Given the input string [$string], what is the outcome? [________]{$popup} END_PGML -ENDDOCUMENT(); \ No newline at end of file +ENDDOCUMENT(); diff --git a/Contrib/LaTech/ProgrammingLanguages/MLSet1_BasicTypesOperators/q1_arithmetic.pg b/Contrib/LaTech/ProgrammingLanguages/MLSet1_BasicTypesOperators/q1_arithmetic.pg index fabd240f21..ba2906c2df 100644 --- a/Contrib/LaTech/ProgrammingLanguages/MLSet1_BasicTypesOperators/q1_arithmetic.pg +++ b/Contrib/LaTech/ProgrammingLanguages/MLSet1_BasicTypesOperators/q1_arithmetic.pg @@ -17,9 +17,9 @@ DOCUMENT(); ## Load libraries loadMacros( "PGstandard.pl", -"PGcourse.pl", "parserPopUp.pl", -"PGML.pl" +"PGML.pl", +"PGcourse.pl" ); ## Change context to numeric answers @@ -46,8 +46,6 @@ $popChar = PopUp(["Choose...","int","bool","real","char","string"], 4); $popString = PopUp(["Choose...","int","bool","real","char","string"], 5); ## Display question -TEXT(beginproblem()); - BEGIN_PGML Determine the value and type returned when the following ML expressions are evaluated. diff --git a/Contrib/LaTech/ProgrammingLanguages/MLSet1_BasicTypesOperators/q2_ifthenelse.pg b/Contrib/LaTech/ProgrammingLanguages/MLSet1_BasicTypesOperators/q2_ifthenelse.pg index 6743bc669b..cc7e3d0516 100644 --- a/Contrib/LaTech/ProgrammingLanguages/MLSet1_BasicTypesOperators/q2_ifthenelse.pg +++ b/Contrib/LaTech/ProgrammingLanguages/MLSet1_BasicTypesOperators/q2_ifthenelse.pg @@ -18,10 +18,10 @@ DOCUMENT(); ## Load libraries loadMacros( "PGstandard.pl", -"PGcourse.pl", "contextArbitraryString.pl", "parserPopUp.pl", -"PGML.pl" +"PGML.pl", +"PGcourse.pl" ); ## Change context to strings answers @@ -51,8 +51,6 @@ $popChar = PopUp(["Choose...","int","bool","real","char","string"], 4); $popString = PopUp(["Choose...","int","bool","real","char","string"], 5); ## Display question -TEXT(beginproblem()); - BEGIN_PGML Determine the value and type returned when the following ML expressions are evaluated. diff --git a/Contrib/LaTech/ProgrammingLanguages/MLSet1_BasicTypesOperators/q3_coercion.pg b/Contrib/LaTech/ProgrammingLanguages/MLSet1_BasicTypesOperators/q3_coercion.pg index e843e3b855..a4ef1c5fe7 100644 --- a/Contrib/LaTech/ProgrammingLanguages/MLSet1_BasicTypesOperators/q3_coercion.pg +++ b/Contrib/LaTech/ProgrammingLanguages/MLSet1_BasicTypesOperators/q3_coercion.pg @@ -17,11 +17,11 @@ DOCUMENT(); ## Load libraries loadMacros( "PGstandard.pl", -"PGcourse.pl", ##"niceTables.pl", ##"contextArbitraryString.pl", "parserPopUp.pl", -"PGML.pl" +"PGML.pl", +"PGcourse.pl" ); ## Change context to numeric answers @@ -59,8 +59,6 @@ $popChar = PopUp(["Choose...","int","bool","real","char","string"], 4); $popString = PopUp(["Choose...","int","bool","real","char","string"], 5); ## Display question -TEXT(beginproblem()); - BEGIN_PGML Determine the value and type returned when the following ML expressions are evaluated. diff --git a/Contrib/LaTech/ProgrammingLanguages/MLSet1_BasicTypesOperators/q4_validate1.pg b/Contrib/LaTech/ProgrammingLanguages/MLSet1_BasicTypesOperators/q4_validate1.pg index ae1d9cdcc9..02135376f2 100644 --- a/Contrib/LaTech/ProgrammingLanguages/MLSet1_BasicTypesOperators/q4_validate1.pg +++ b/Contrib/LaTech/ProgrammingLanguages/MLSet1_BasicTypesOperators/q4_validate1.pg @@ -18,11 +18,11 @@ DOCUMENT(); ## Load libraries loadMacros( "PGstandard.pl", -"PGcourse.pl", ##"niceTables.pl", ##"contextArbitraryString.pl", "parserPopUp.pl", -"PGML.pl" +"PGML.pl", +"PGcourse.pl" ); ## Do not reveal partial solutions for popup questions. @@ -39,8 +39,6 @@ $popValid = PopUp(["Choose...","Valid","Invalid"], 1); $popInvalid = PopUp(["Choose...","Valid","Invalid"], 2); ## Display question -TEXT(beginproblem()); - BEGIN_PGML Determine whether the following ML expressions are valid or invalid diff --git a/Contrib/LaTech/ProgrammingLanguages/MLSet1_BasicTypesOperators/q5_validate2.pg b/Contrib/LaTech/ProgrammingLanguages/MLSet1_BasicTypesOperators/q5_validate2.pg index 3b9713ef2a..81c6e91f67 100644 --- a/Contrib/LaTech/ProgrammingLanguages/MLSet1_BasicTypesOperators/q5_validate2.pg +++ b/Contrib/LaTech/ProgrammingLanguages/MLSet1_BasicTypesOperators/q5_validate2.pg @@ -18,11 +18,11 @@ DOCUMENT(); ## Load libraries loadMacros( "PGstandard.pl", -"PGcourse.pl", ##"niceTables.pl", ##"contextArbitraryString.pl", "parserPopUp.pl", -"PGML.pl" +"PGML.pl", +"PGcourse.pl" ); ## Do not reveal partial solutions for popup questions. @@ -39,8 +39,6 @@ $popValid = PopUp(["Choose...","Valid","Invalid"], 1); $popInvalid = PopUp(["Choose...","Valid","Invalid"], 2); ## Display question -TEXT(beginproblem()); - BEGIN_PGML Determine whether the following ML expressions are valid or invalid diff --git a/Contrib/LaTech/ProgrammingLanguages/MLSet2_ValuesTuplesLists/q1_values1.pg b/Contrib/LaTech/ProgrammingLanguages/MLSet2_ValuesTuplesLists/q1_values1.pg index 2977680f9b..09839ccc49 100644 --- a/Contrib/LaTech/ProgrammingLanguages/MLSet2_ValuesTuplesLists/q1_values1.pg +++ b/Contrib/LaTech/ProgrammingLanguages/MLSet2_ValuesTuplesLists/q1_values1.pg @@ -18,9 +18,9 @@ DOCUMENT(); ## Load libraries loadMacros( "PGstandard.pl", -"PGcourse.pl", "contextArbitraryString.pl", -"PGML.pl" +"PGML.pl", +"PGcourse.pl" ); ## Change context to strings answers @@ -39,8 +39,6 @@ $a = $c - $a; $c = $c + $a; ## Display question -TEXT(beginproblem()); - BEGIN_PGML Determine the final value of the all variables after all the following ML value declarations. diff --git a/Contrib/LaTech/ProgrammingLanguages/MLSet2_ValuesTuplesLists/q2_tuplelisttype1.pg b/Contrib/LaTech/ProgrammingLanguages/MLSet2_ValuesTuplesLists/q2_tuplelisttype1.pg index f91d6e5fb4..3ccbee8c73 100644 --- a/Contrib/LaTech/ProgrammingLanguages/MLSet2_ValuesTuplesLists/q2_tuplelisttype1.pg +++ b/Contrib/LaTech/ProgrammingLanguages/MLSet2_ValuesTuplesLists/q2_tuplelisttype1.pg @@ -17,9 +17,9 @@ DOCUMENT(); ## Load libraries loadMacros( "PGstandard.pl", -"PGcourse.pl", "contextArbitraryString.pl", -"PGML.pl" +"PGML.pl", +"PGcourse.pl" ); ## Change context to strings answers @@ -65,8 +65,6 @@ $ans5 = String("int list list")->cmp( ## Display question -TEXT(beginproblem()); - BEGIN_PGML Write the type of the following ML expressions. *WARNING: Only use required parentheses for types to match the ML compiler's response.* diff --git a/Contrib/LaTech/ProgrammingLanguages/MLSet2_ValuesTuplesLists/q3_tuplelisttype2.pg b/Contrib/LaTech/ProgrammingLanguages/MLSet2_ValuesTuplesLists/q3_tuplelisttype2.pg index b720d6eac3..2023afb435 100644 --- a/Contrib/LaTech/ProgrammingLanguages/MLSet2_ValuesTuplesLists/q3_tuplelisttype2.pg +++ b/Contrib/LaTech/ProgrammingLanguages/MLSet2_ValuesTuplesLists/q3_tuplelisttype2.pg @@ -17,9 +17,9 @@ DOCUMENT(); ## Load libraries loadMacros( "PGstandard.pl", -"PGcourse.pl", "contextArbitraryString.pl", -"PGML.pl" +"PGML.pl", +"PGcourse.pl" ); ## Change context to strings answers @@ -65,8 +65,6 @@ $ans5 = String("((int*int)*int) list")->cmp( ## Display question -TEXT(beginproblem()); - BEGIN_PGML Write the type of the following ML expressions. *WARNING: Only use required parentheses for types to match the ML compiler's response.* diff --git a/Contrib/LaTech/ProgrammingLanguages/MLSet2_ValuesTuplesLists/q4_listtype1.pg b/Contrib/LaTech/ProgrammingLanguages/MLSet2_ValuesTuplesLists/q4_listtype1.pg index 9d8ddd9948..f74f587f3b 100644 --- a/Contrib/LaTech/ProgrammingLanguages/MLSet2_ValuesTuplesLists/q4_listtype1.pg +++ b/Contrib/LaTech/ProgrammingLanguages/MLSet2_ValuesTuplesLists/q4_listtype1.pg @@ -17,9 +17,9 @@ DOCUMENT(); ## Load libraries loadMacros( "PGstandard.pl", -"PGcourse.pl", "contextArbitraryString.pl", -"PGML.pl" +"PGML.pl", +"PGcourse.pl" ); ## Change context to strings answers @@ -100,8 +100,6 @@ $type5 = String("bool list")->cmp( ## Display question -TEXT(beginproblem()); - BEGIN_PGML Write the value and type of the following ML expressions. *WARNING: Only use required parentheses for tuples and types to match the ML compiler's response.* diff --git a/Contrib/LaTech/ProgrammingLanguages/MLSet2_ValuesTuplesLists/q5_listtype2.pg b/Contrib/LaTech/ProgrammingLanguages/MLSet2_ValuesTuplesLists/q5_listtype2.pg index 96173de80c..e170984e97 100644 --- a/Contrib/LaTech/ProgrammingLanguages/MLSet2_ValuesTuplesLists/q5_listtype2.pg +++ b/Contrib/LaTech/ProgrammingLanguages/MLSet2_ValuesTuplesLists/q5_listtype2.pg @@ -17,9 +17,9 @@ DOCUMENT(); ## Load libraries loadMacros( "PGstandard.pl", -"PGcourse.pl", "contextArbitraryString.pl", -"PGML.pl" +"PGML.pl", +"PGcourse.pl" ); ## Change context to strings answers @@ -103,8 +103,6 @@ $type5 = String("string")->cmp( ## Display question -TEXT(beginproblem()); - BEGIN_PGML Write the value and type of the following ML expressions. *WARNING: Only use required parentheses for tuples and types to match the ML compiler's response.* diff --git a/Contrib/LaTech/ProgrammingLanguages/MLSet3_Functions/q01_fun1.pg b/Contrib/LaTech/ProgrammingLanguages/MLSet3_Functions/q01_fun1.pg index 5ddbe4dacb..0fdd7bc80b 100644 --- a/Contrib/LaTech/ProgrammingLanguages/MLSet3_Functions/q01_fun1.pg +++ b/Contrib/LaTech/ProgrammingLanguages/MLSet3_Functions/q01_fun1.pg @@ -17,9 +17,9 @@ DOCUMENT(); ## Load libraries loadMacros( "PGstandard.pl", -"PGcourse.pl", "contextArbitraryString.pl", -"PGML.pl" +"PGML.pl", +"PGcourse.pl" ); ## Change context to strings answers @@ -90,8 +90,6 @@ $type5 = String("int")->cmp( ## Display question -TEXT(beginproblem()); - BEGIN_PGML Suppose we execute the following lines of ML code. diff --git a/Contrib/LaTech/ProgrammingLanguages/MLSet3_Functions/q02_fun2.pg b/Contrib/LaTech/ProgrammingLanguages/MLSet3_Functions/q02_fun2.pg index db214ab911..48f5fd4d79 100644 --- a/Contrib/LaTech/ProgrammingLanguages/MLSet3_Functions/q02_fun2.pg +++ b/Contrib/LaTech/ProgrammingLanguages/MLSet3_Functions/q02_fun2.pg @@ -17,9 +17,9 @@ DOCUMENT(); ## Load libraries loadMacros( "PGstandard.pl", -"PGcourse.pl", "contextArbitraryString.pl", -"PGML.pl" +"PGML.pl", +"PGcourse.pl" ); ## Change context to strings answers @@ -75,8 +75,6 @@ $type5 = String("bool->bool")->cmp( ## Display question -TEXT(beginproblem()); - BEGIN_PGML Write the type of the given ML function f. *WARNING: Types must use the minimum set of parentheses to match the ML compiler's response.* diff --git a/Contrib/LaTech/ProgrammingLanguages/MLSet3_Functions/q03_fun3.pg b/Contrib/LaTech/ProgrammingLanguages/MLSet3_Functions/q03_fun3.pg index 14cf0fdc8b..315a9055f1 100644 --- a/Contrib/LaTech/ProgrammingLanguages/MLSet3_Functions/q03_fun3.pg +++ b/Contrib/LaTech/ProgrammingLanguages/MLSet3_Functions/q03_fun3.pg @@ -17,9 +17,9 @@ DOCUMENT(); ## Load libraries loadMacros( "PGstandard.pl", -"PGcourse.pl", "contextArbitraryString.pl", -"PGML.pl" +"PGML.pl", +"PGcourse.pl" ); ## Change context to strings answers @@ -75,8 +75,6 @@ $type5 = String("'a*'b->'b*'a")->cmp( ## Display question -TEXT(beginproblem()); - BEGIN_PGML Write the type of the given ML function f. *WARNING: Types must use the minimum set of parentheses to match the ML compiler's response.* diff --git a/Contrib/LaTech/ProgrammingLanguages/MLSet3_Functions/q04_fun4.pg b/Contrib/LaTech/ProgrammingLanguages/MLSet3_Functions/q04_fun4.pg index fb1314acfe..22d8fc9428 100644 --- a/Contrib/LaTech/ProgrammingLanguages/MLSet3_Functions/q04_fun4.pg +++ b/Contrib/LaTech/ProgrammingLanguages/MLSet3_Functions/q04_fun4.pg @@ -17,9 +17,9 @@ DOCUMENT(); ## Load libraries loadMacros( "PGstandard.pl", -"PGcourse.pl", "contextArbitraryString.pl", -"PGML.pl" +"PGML.pl", +"PGcourse.pl" ); ## Change context to strings answers @@ -75,8 +75,6 @@ $type5 = String("'a->'b->'b")->cmp( ## Display question -TEXT(beginproblem()); - BEGIN_PGML Write the type of the given ML function f. *WARNING: Types must use the minimum set of parentheses to match the ML compiler's response.* diff --git a/Contrib/LaTech/ProgrammingLanguages/MLSet3_Functions/q05_fun5.pg b/Contrib/LaTech/ProgrammingLanguages/MLSet3_Functions/q05_fun5.pg index 3526814abe..2b759c5228 100644 --- a/Contrib/LaTech/ProgrammingLanguages/MLSet3_Functions/q05_fun5.pg +++ b/Contrib/LaTech/ProgrammingLanguages/MLSet3_Functions/q05_fun5.pg @@ -17,9 +17,9 @@ DOCUMENT(); ## Load libraries loadMacros( "PGstandard.pl", -"PGcourse.pl", "contextArbitraryString.pl", -"PGML.pl" +"PGML.pl", +"PGcourse.pl" ); ## Change context to strings answers @@ -73,8 +73,6 @@ $type5 = String("'a->'b->'a*'b")->cmp( ## Display question -TEXT(beginproblem()); - BEGIN_PGML Write the type of the given ML function f. *WARNING: Types must use the minimum set of parentheses to match the ML compiler's response.* diff --git a/Contrib/LaTech/ProgrammingLanguages/MLSet3_Functions/q06_fun6.pg b/Contrib/LaTech/ProgrammingLanguages/MLSet3_Functions/q06_fun6.pg index 4cd14988f7..17a7c3844c 100644 --- a/Contrib/LaTech/ProgrammingLanguages/MLSet3_Functions/q06_fun6.pg +++ b/Contrib/LaTech/ProgrammingLanguages/MLSet3_Functions/q06_fun6.pg @@ -18,9 +18,9 @@ DOCUMENT(); ## Load libraries loadMacros( "PGstandard.pl", -"PGcourse.pl", "contextArbitraryString.pl", -"PGML.pl" +"PGML.pl", +"PGcourse.pl" ); ## Change context to strings answers @@ -74,8 +74,6 @@ $type5 = String("int*int->int*int->int")->cmp( ## Display question -TEXT(beginproblem()); - BEGIN_PGML Write the type of the given ML function f. *WARNING: Types must use the minimum set of parentheses to match the ML compiler's response.* diff --git a/Contrib/LaTech/ProgrammingLanguages/MLSet3_Functions/q07_fun7.pg b/Contrib/LaTech/ProgrammingLanguages/MLSet3_Functions/q07_fun7.pg index 4c31b9a54f..ba829c33f1 100644 --- a/Contrib/LaTech/ProgrammingLanguages/MLSet3_Functions/q07_fun7.pg +++ b/Contrib/LaTech/ProgrammingLanguages/MLSet3_Functions/q07_fun7.pg @@ -16,9 +16,9 @@ DOCUMENT(); ## Load libraries loadMacros( "PGstandard.pl", -"PGcourse.pl", "contextArbitraryString.pl", -"PGML.pl" +"PGML.pl", +"PGcourse.pl" ); ## Change context to strings answers @@ -99,8 +99,6 @@ $type5 = String("int list")->cmp( ## Display question -TEXT(beginproblem()); - BEGIN_PGML Suppose we execute the following lines of ML code. diff --git a/Contrib/LaTech/ProgrammingLanguages/MLSet3_Functions/q08_recursion1.pg b/Contrib/LaTech/ProgrammingLanguages/MLSet3_Functions/q08_recursion1.pg index 87a2cfebf3..8897a5bb7a 100644 --- a/Contrib/LaTech/ProgrammingLanguages/MLSet3_Functions/q08_recursion1.pg +++ b/Contrib/LaTech/ProgrammingLanguages/MLSet3_Functions/q08_recursion1.pg @@ -17,8 +17,8 @@ DOCUMENT(); ## Load libraries loadMacros( "PGstandard.pl", -"PGcourse.pl", -"PGML.pl" +"PGML.pl", +"PGcourse.pl" ); ## Set context to numeric answers @@ -49,8 +49,6 @@ $ans4 = myfun($n2); $ans5 = myfun($n3); ## Display question -TEXT(beginproblem()); - BEGIN_PGML Consider the following recursive ML function: diff --git a/Contrib/LaTech/ProgrammingLanguages/MLSet3_Functions/q09_recursion2.pg b/Contrib/LaTech/ProgrammingLanguages/MLSet3_Functions/q09_recursion2.pg index fdbe75ff0f..2a568bdade 100644 --- a/Contrib/LaTech/ProgrammingLanguages/MLSet3_Functions/q09_recursion2.pg +++ b/Contrib/LaTech/ProgrammingLanguages/MLSet3_Functions/q09_recursion2.pg @@ -18,8 +18,8 @@ DOCUMENT(); ## Load libraries loadMacros( "PGstandard.pl", -"PGcourse.pl", -"PGML.pl" +"PGML.pl", +"PGcourse.pl" ); ## Set context to numeric answers @@ -49,8 +49,6 @@ $ans4 = myfun($n1); $ans5 = myfun($n2); ## Display question -TEXT(beginproblem()); - BEGIN_PGML Consider the following recursive ML function: diff --git a/Contrib/LaTech/ProgrammingLanguages/MLSet3_Functions/q10_recursion3.pg b/Contrib/LaTech/ProgrammingLanguages/MLSet3_Functions/q10_recursion3.pg index 22637323c9..fa231c79d6 100644 --- a/Contrib/LaTech/ProgrammingLanguages/MLSet3_Functions/q10_recursion3.pg +++ b/Contrib/LaTech/ProgrammingLanguages/MLSet3_Functions/q10_recursion3.pg @@ -17,8 +17,8 @@ DOCUMENT(); ## Load libraries loadMacros( "PGstandard.pl", -"PGcourse.pl", -"PGML.pl" +"PGML.pl", +"PGcourse.pl" ); ## Set context to numeric answers @@ -59,8 +59,6 @@ $ans4 = f($n1); $ans5 = g($n1); ## Display question -TEXT(beginproblem()); - BEGIN_PGML Consider the following mutually recursive ML functions: diff --git a/Contrib/LaTech/ProgrammingLanguages/MLSet4_AdvancedFunctionsTypes/q1_mapreduce1.pg b/Contrib/LaTech/ProgrammingLanguages/MLSet4_AdvancedFunctionsTypes/q1_mapreduce1.pg index 3ecacec28e..12f39de74d 100644 --- a/Contrib/LaTech/ProgrammingLanguages/MLSet4_AdvancedFunctionsTypes/q1_mapreduce1.pg +++ b/Contrib/LaTech/ProgrammingLanguages/MLSet4_AdvancedFunctionsTypes/q1_mapreduce1.pg @@ -17,9 +17,9 @@ DOCUMENT(); ## Load libraries loadMacros( "PGstandard.pl", -"PGcourse.pl", "contextArbitraryString.pl", -"PGML.pl" +"PGML.pl", +"PGcourse.pl" ); ## Change context to strings answers @@ -97,8 +97,6 @@ $type5 = String("string")->cmp( ## Display question -TEXT(beginproblem()); - BEGIN_PGML Suppose we execute the following lines of ML code. diff --git a/Contrib/LaTech/ProgrammingLanguages/MLSet4_AdvancedFunctionsTypes/q2_mapreduce2.pg b/Contrib/LaTech/ProgrammingLanguages/MLSet4_AdvancedFunctionsTypes/q2_mapreduce2.pg index afb8a2c8a1..3a2ef2781c 100644 --- a/Contrib/LaTech/ProgrammingLanguages/MLSet4_AdvancedFunctionsTypes/q2_mapreduce2.pg +++ b/Contrib/LaTech/ProgrammingLanguages/MLSet4_AdvancedFunctionsTypes/q2_mapreduce2.pg @@ -17,9 +17,9 @@ DOCUMENT(); ## Load libraries loadMacros( "PGstandard.pl", -"PGcourse.pl", "contextArbitraryString.pl", -"PGML.pl" +"PGML.pl", +"PGcourse.pl" ); ## Change context to strings answers @@ -106,8 +106,6 @@ $type5 = String("int")->cmp( ## Display question -TEXT(beginproblem()); - BEGIN_PGML Suppose we execute the following lines of ML code. diff --git a/Contrib/LaTech/ProgrammingLanguages/MLSet4_AdvancedFunctionsTypes/q3_option1.pg b/Contrib/LaTech/ProgrammingLanguages/MLSet4_AdvancedFunctionsTypes/q3_option1.pg index f36f19e293..f851703a28 100644 --- a/Contrib/LaTech/ProgrammingLanguages/MLSet4_AdvancedFunctionsTypes/q3_option1.pg +++ b/Contrib/LaTech/ProgrammingLanguages/MLSet4_AdvancedFunctionsTypes/q3_option1.pg @@ -17,9 +17,9 @@ DOCUMENT(); ## Load libraries loadMacros( "PGstandard.pl", -"PGcourse.pl", "contextArbitraryString.pl", -"PGML.pl" +"PGML.pl", +"PGcourse.pl" ); ## Change context to strings answers @@ -68,8 +68,6 @@ $ans5 = String("int option list")->cmp( ## Display question -TEXT(beginproblem()); - BEGIN_PGML Write the type of the following ML expressions. *WARNING: Only use required parentheses for types to match the ML compiler's response.* diff --git a/Contrib/LaTech/ProgrammingLanguages/MLSet4_AdvancedFunctionsTypes/q4_option2.pg b/Contrib/LaTech/ProgrammingLanguages/MLSet4_AdvancedFunctionsTypes/q4_option2.pg index ac644042d7..0e86b4e304 100644 --- a/Contrib/LaTech/ProgrammingLanguages/MLSet4_AdvancedFunctionsTypes/q4_option2.pg +++ b/Contrib/LaTech/ProgrammingLanguages/MLSet4_AdvancedFunctionsTypes/q4_option2.pg @@ -17,9 +17,9 @@ DOCUMENT(); ## Load libraries loadMacros( "PGstandard.pl", -"PGcourse.pl", "contextArbitraryString.pl", -"PGML.pl" +"PGML.pl", +"PGcourse.pl" ); ## Change context to strings answers @@ -76,8 +76,6 @@ $type5 = String("'a option->bool")->cmp( ## Display question -TEXT(beginproblem()); - BEGIN_PGML Write the type of the given ML function f. *WARNING: Types must use the minimum set of parentheses to match the ML compiler's response.* diff --git a/Contrib/LaTech/ProgrammingLanguages/MLSet4_AdvancedFunctionsTypes/q5_option3.pg b/Contrib/LaTech/ProgrammingLanguages/MLSet4_AdvancedFunctionsTypes/q5_option3.pg index 5df884b4ad..22e8733c0d 100644 --- a/Contrib/LaTech/ProgrammingLanguages/MLSet4_AdvancedFunctionsTypes/q5_option3.pg +++ b/Contrib/LaTech/ProgrammingLanguages/MLSet4_AdvancedFunctionsTypes/q5_option3.pg @@ -17,9 +17,9 @@ DOCUMENT(); ## Load libraries loadMacros( "PGstandard.pl", -"PGcourse.pl", "contextArbitraryString.pl", -"PGML.pl" +"PGML.pl", +"PGcourse.pl" ); ## Change context to strings answers @@ -76,8 +76,6 @@ $type5 = String("'a option*'a->'a option list")->cmp( ## Display question -TEXT(beginproblem()); - BEGIN_PGML Write the type of the given ML function f. *WARNING: Types must use the minimum set of parentheses to match the ML compiler's response.* diff --git a/Contrib/LaTech/ProgrammingLanguages/PrologSet1_UnifyGoals/q1_unify1.pg b/Contrib/LaTech/ProgrammingLanguages/PrologSet1_UnifyGoals/q1_unify1.pg index 091dc74220..6b8d2da4a3 100644 --- a/Contrib/LaTech/ProgrammingLanguages/PrologSet1_UnifyGoals/q1_unify1.pg +++ b/Contrib/LaTech/ProgrammingLanguages/PrologSet1_UnifyGoals/q1_unify1.pg @@ -17,9 +17,9 @@ DOCUMENT(); ## Load libraries loadMacros( "PGstandard.pl", -"PGcourse.pl", "contextArbitraryString.pl", -"PGML.pl" +"PGML.pl", +"PGcourse.pl" ); ## Change context to strings answers @@ -70,8 +70,6 @@ $ans5 = String("false")->cmp( ); ## Display question -TEXT(beginproblem()); - BEGIN_PGML Determine whether the following Prolog statements would succeed or fail, and then which variables, if any, would be instantiated to which values. Write your answer on the blank line provided *IN THE CORRECT FORMAT AS FOLLOWS*. diff --git a/Contrib/LaTech/ProgrammingLanguages/PrologSet1_UnifyGoals/q2_unify2.pg b/Contrib/LaTech/ProgrammingLanguages/PrologSet1_UnifyGoals/q2_unify2.pg index 275abc85be..b075f5e5ba 100644 --- a/Contrib/LaTech/ProgrammingLanguages/PrologSet1_UnifyGoals/q2_unify2.pg +++ b/Contrib/LaTech/ProgrammingLanguages/PrologSet1_UnifyGoals/q2_unify2.pg @@ -17,9 +17,9 @@ DOCUMENT(); ## Load libraries loadMacros( "PGstandard.pl", -"PGcourse.pl", "contextArbitraryString.pl", -"PGML.pl" +"PGML.pl", +"PGcourse.pl" ); ## Change context to strings answers @@ -70,8 +70,6 @@ $ans5 = String("false")->cmp( ); ## Display question -TEXT(beginproblem()); - BEGIN_PGML Determine whether the following Prolog statements would succeed or fail, and then which variables, if any, would be instantiated to which values. Write your answer on the blank line provided *IN THE CORRECT FORMAT AS FOLLOWS*. diff --git a/Contrib/LaTech/ProgrammingLanguages/PrologSet1_UnifyGoals/q3_goal1.pg b/Contrib/LaTech/ProgrammingLanguages/PrologSet1_UnifyGoals/q3_goal1.pg index e7838cabe6..093a8944a1 100644 --- a/Contrib/LaTech/ProgrammingLanguages/PrologSet1_UnifyGoals/q3_goal1.pg +++ b/Contrib/LaTech/ProgrammingLanguages/PrologSet1_UnifyGoals/q3_goal1.pg @@ -18,9 +18,9 @@ DOCUMENT(); ## Load libraries loadMacros( "PGstandard.pl", -"PGcourse.pl", "contextArbitraryString.pl", -"PGML.pl" +"PGML.pl", +"PGcourse.pl" ); ## Change context to strings answers @@ -67,8 +67,6 @@ $ans5 = String("false")->cmp( ); ## Display question -TEXT(beginproblem()); - BEGIN_PGML Suppose Prolog has read the following database. diff --git a/Contrib/LaTech/ProgrammingLanguages/PrologSet1_UnifyGoals/q4_goal2.pg b/Contrib/LaTech/ProgrammingLanguages/PrologSet1_UnifyGoals/q4_goal2.pg index f43b4bd1ae..15c88c65cc 100644 --- a/Contrib/LaTech/ProgrammingLanguages/PrologSet1_UnifyGoals/q4_goal2.pg +++ b/Contrib/LaTech/ProgrammingLanguages/PrologSet1_UnifyGoals/q4_goal2.pg @@ -18,9 +18,9 @@ DOCUMENT(); ## Load libraries loadMacros( "PGstandard.pl", -"PGcourse.pl", "contextArbitraryString.pl", -"PGML.pl" +"PGML.pl", +"PGcourse.pl" ); ## Change context to strings answers @@ -67,8 +67,6 @@ $ans5 = String("A=rick,A=michonne")->cmp( ); ## Display question -TEXT(beginproblem()); - BEGIN_PGML Suppose Prolog has read the following database. diff --git a/Contrib/LaTech/ProgrammingLanguages/PrologSet1_UnifyGoals/q5_goal3.pg b/Contrib/LaTech/ProgrammingLanguages/PrologSet1_UnifyGoals/q5_goal3.pg index 78c3d61c18..078734f3b5 100644 --- a/Contrib/LaTech/ProgrammingLanguages/PrologSet1_UnifyGoals/q5_goal3.pg +++ b/Contrib/LaTech/ProgrammingLanguages/PrologSet1_UnifyGoals/q5_goal3.pg @@ -18,9 +18,9 @@ DOCUMENT(); ## Load libraries loadMacros( "PGstandard.pl", -"PGcourse.pl", "contextArbitraryString.pl", -"PGML.pl" +"PGML.pl", +"PGcourse.pl" ); ## Change context to strings answers @@ -67,8 +67,6 @@ $ans5 = String("A=dan,B=sally,A=sally,B=dan")->cmp( ); ## Display question -TEXT(beginproblem()); - BEGIN_PGML Suppose Prolog has read the following database. diff --git a/Contrib/LaTech/ProgrammingLanguages/PrologSet2_OperatorsArithmetic/q1_opsarith1.pg b/Contrib/LaTech/ProgrammingLanguages/PrologSet2_OperatorsArithmetic/q1_opsarith1.pg index 0602e19486..131f2f5711 100644 --- a/Contrib/LaTech/ProgrammingLanguages/PrologSet2_OperatorsArithmetic/q1_opsarith1.pg +++ b/Contrib/LaTech/ProgrammingLanguages/PrologSet2_OperatorsArithmetic/q1_opsarith1.pg @@ -17,9 +17,9 @@ DOCUMENT(); ## Load libraries loadMacros( "PGstandard.pl", -"PGcourse.pl", "contextArbitraryString.pl", -"PGML.pl" +"PGML.pl", +"PGcourse.pl" ); ## Change context to strings answers @@ -76,8 +76,6 @@ $ans5 = String("X=$b,Y=-$b-2")->cmp( ); ## Display question -TEXT(beginproblem()); - BEGIN_PGML Determine whether the following Prolog statements would succeed or fail, and then which variables, if any, would be instantiated to which values. Write your answer on the blank line provided *IN THE CORRECT FORMAT AS FOLLOWS*. diff --git a/Contrib/LaTech/ProgrammingLanguages/PrologSet2_OperatorsArithmetic/q2_opsarith2.pg b/Contrib/LaTech/ProgrammingLanguages/PrologSet2_OperatorsArithmetic/q2_opsarith2.pg index 029a82eac8..cd1fa5125e 100644 --- a/Contrib/LaTech/ProgrammingLanguages/PrologSet2_OperatorsArithmetic/q2_opsarith2.pg +++ b/Contrib/LaTech/ProgrammingLanguages/PrologSet2_OperatorsArithmetic/q2_opsarith2.pg @@ -17,9 +17,9 @@ DOCUMENT(); ## Load libraries loadMacros( "PGstandard.pl", -"PGcourse.pl", "contextArbitraryString.pl", -"PGML.pl" +"PGML.pl", +"PGcourse.pl" ); ## Change context to strings answers @@ -76,8 +76,6 @@ $ans5 = String("false")->cmp( ); ## Display question -TEXT(beginproblem()); - BEGIN_PGML Determine whether the following Prolog statements would succeed or fail, and then which variables, if any, would be instantiated to which values. Write your answer on the blank line provided *IN THE CORRECT FORMAT AS FOLLOWS*. diff --git a/Contrib/LaTech/ProgrammingLanguages/PrologSet2_OperatorsArithmetic/q3_opsarith3.pg b/Contrib/LaTech/ProgrammingLanguages/PrologSet2_OperatorsArithmetic/q3_opsarith3.pg index d3b4441bbd..8f388331f6 100644 --- a/Contrib/LaTech/ProgrammingLanguages/PrologSet2_OperatorsArithmetic/q3_opsarith3.pg +++ b/Contrib/LaTech/ProgrammingLanguages/PrologSet2_OperatorsArithmetic/q3_opsarith3.pg @@ -17,9 +17,9 @@ DOCUMENT(); ## Load libraries loadMacros( "PGstandard.pl", -"PGcourse.pl", "contextArbitraryString.pl", -"PGML.pl" +"PGML.pl", +"PGcourse.pl" ); ## Change context to strings answers @@ -76,8 +76,6 @@ $ans5 = String("false")->cmp( ); ## Display question -TEXT(beginproblem()); - BEGIN_PGML Determine whether the following Prolog statements would succeed or fail, and then which variables, if any, would be instantiated to which values. Write your answer on the blank line provided *IN THE CORRECT FORMAT AS FOLLOWS*. diff --git a/Contrib/LaTech/ProgrammingLanguages/PrologSet2_OperatorsArithmetic/q4_opsarith4.pg b/Contrib/LaTech/ProgrammingLanguages/PrologSet2_OperatorsArithmetic/q4_opsarith4.pg index 141434b51b..6d442487d4 100644 --- a/Contrib/LaTech/ProgrammingLanguages/PrologSet2_OperatorsArithmetic/q4_opsarith4.pg +++ b/Contrib/LaTech/ProgrammingLanguages/PrologSet2_OperatorsArithmetic/q4_opsarith4.pg @@ -17,9 +17,9 @@ DOCUMENT(); ## Load libraries loadMacros( "PGstandard.pl", -"PGcourse.pl", "contextArbitraryString.pl", -"PGML.pl" +"PGML.pl", +"PGcourse.pl" ); ## Change context to strings answers @@ -78,8 +78,6 @@ $ans5 = String("R=$a4")->cmp( ); ## Display question -TEXT(beginproblem()); - BEGIN_PGML Suppose Prolog has read the following database: *f(X,R) :- R is [$a]\*X + [$b].* diff --git a/Contrib/LaTech/ProgrammingLanguages/PrologSet2_OperatorsArithmetic/q5_chars1.pg b/Contrib/LaTech/ProgrammingLanguages/PrologSet2_OperatorsArithmetic/q5_chars1.pg index 4d0f3f8e26..8a50d537bf 100644 --- a/Contrib/LaTech/ProgrammingLanguages/PrologSet2_OperatorsArithmetic/q5_chars1.pg +++ b/Contrib/LaTech/ProgrammingLanguages/PrologSet2_OperatorsArithmetic/q5_chars1.pg @@ -18,9 +18,9 @@ DOCUMENT(); ## Load libraries loadMacros( "PGstandard.pl", -"PGcourse.pl", "contextArbitraryString.pl", -"PGML.pl" +"PGML.pl", +"PGcourse.pl" ); ## Change context to strings answers @@ -78,8 +78,6 @@ $ans5 = String("X=$s")->cmp( ); ## Display question -TEXT(beginproblem()); - BEGIN_PGML Determine whether the following Prolog statements would succeed or fail, and then which variables, if any, would be instantiated to which values. Write your answer on the blank line provided *IN THE CORRECT FORMAT AS FOLLOWS*. diff --git a/Contrib/LaTech/ProgrammingLanguages/PrologSet3_Lists/q1_list1.pg b/Contrib/LaTech/ProgrammingLanguages/PrologSet3_Lists/q1_list1.pg index 4bc5b9a414..97b09eff5c 100644 --- a/Contrib/LaTech/ProgrammingLanguages/PrologSet3_Lists/q1_list1.pg +++ b/Contrib/LaTech/ProgrammingLanguages/PrologSet3_Lists/q1_list1.pg @@ -17,9 +17,9 @@ DOCUMENT(); ## Load libraries loadMacros( "PGstandard.pl", -"PGcourse.pl", "contextArbitraryString.pl", -"PGML.pl" +"PGML.pl", +"PGcourse.pl" ); ## Change context to strings answers @@ -71,8 +71,6 @@ $ans5 = String("X=a$a,Y=b$b,Z=[c$c]")->cmp( ); ## Display question -TEXT(beginproblem()); - BEGIN_PGML Determine whether the following Prolog statements would succeed or fail, and then which variables, if any, would be instantiated to which values. Write your answer on the blank line provided *IN THE CORRECT FORMAT AS FOLLOWS*. diff --git a/Contrib/LaTech/ProgrammingLanguages/PrologSet3_Lists/q2_list2.pg b/Contrib/LaTech/ProgrammingLanguages/PrologSet3_Lists/q2_list2.pg index fbaad4c6bd..a37518e42c 100644 --- a/Contrib/LaTech/ProgrammingLanguages/PrologSet3_Lists/q2_list2.pg +++ b/Contrib/LaTech/ProgrammingLanguages/PrologSet3_Lists/q2_list2.pg @@ -17,9 +17,9 @@ DOCUMENT(); ## Load libraries loadMacros( "PGstandard.pl", -"PGcourse.pl", "contextArbitraryString.pl", -"PGML.pl" +"PGML.pl", +"PGcourse.pl" ); ## Change context to strings answers @@ -71,8 +71,6 @@ $ans5 = String("X=a$a,Z=[c$c]")->cmp( ); ## Display question -TEXT(beginproblem()); - BEGIN_PGML Determine whether the following Prolog statements would succeed or fail, and then which variables, if any, would be instantiated to which values. Write your answer on the blank line provided *IN THE CORRECT FORMAT AS FOLLOWS*. diff --git a/Contrib/LaTech/ProgrammingLanguages/PrologSet3_Lists/q3_list3.pg b/Contrib/LaTech/ProgrammingLanguages/PrologSet3_Lists/q3_list3.pg index 669287de47..5a4e3fd5cb 100644 --- a/Contrib/LaTech/ProgrammingLanguages/PrologSet3_Lists/q3_list3.pg +++ b/Contrib/LaTech/ProgrammingLanguages/PrologSet3_Lists/q3_list3.pg @@ -17,9 +17,9 @@ DOCUMENT(); ## Load libraries loadMacros( "PGstandard.pl", -"PGcourse.pl", "contextArbitraryString.pl", -"PGML.pl" +"PGML.pl", +"PGcourse.pl" ); ## Change context to strings answers @@ -71,8 +71,6 @@ $ans5 = String("false")->cmp( ); ## Display question -TEXT(beginproblem()); - BEGIN_PGML Determine whether the following Prolog statements would succeed or fail, and then which variables, if any, would be instantiated to which values. Write your answer on the blank line provided *IN THE CORRECT FORMAT AS FOLLOWS*. diff --git a/Contrib/LaTech/ProgrammingLanguages/PrologSet3_Lists/q4_list4.pg b/Contrib/LaTech/ProgrammingLanguages/PrologSet3_Lists/q4_list4.pg index fd8d48b185..6a2a0fef1d 100644 --- a/Contrib/LaTech/ProgrammingLanguages/PrologSet3_Lists/q4_list4.pg +++ b/Contrib/LaTech/ProgrammingLanguages/PrologSet3_Lists/q4_list4.pg @@ -17,9 +17,9 @@ DOCUMENT(); ## Load libraries loadMacros( "PGstandard.pl", -"PGcourse.pl", "contextArbitraryString.pl", -"PGML.pl" +"PGML.pl", +"PGcourse.pl" ); ## Change context to strings answers @@ -71,8 +71,6 @@ $ans5 = String("R=c$c" . "b$b" . "a$a")->cmp( ); ## Display question -TEXT(beginproblem()); - BEGIN_PGML Determine whether the following Prolog statements would succeed or fail, and then which variables, if any, would be instantiated to which values. Write your answer on the blank line provided *IN THE CORRECT FORMAT AS FOLLOWS*. diff --git a/Contrib/LaTech/ProgrammingLanguages/PrologSet3_Lists/q5_maplistfoldl1.pg b/Contrib/LaTech/ProgrammingLanguages/PrologSet3_Lists/q5_maplistfoldl1.pg index 8730b8763a..20ad8cb0c4 100644 --- a/Contrib/LaTech/ProgrammingLanguages/PrologSet3_Lists/q5_maplistfoldl1.pg +++ b/Contrib/LaTech/ProgrammingLanguages/PrologSet3_Lists/q5_maplistfoldl1.pg @@ -17,9 +17,9 @@ DOCUMENT(); ## Load libraries loadMacros( "PGstandard.pl", -"PGcourse.pl", "contextArbitraryString.pl", -"PGML.pl" +"PGML.pl", +"PGcourse.pl" ); ## Change context to strings answers @@ -79,8 +79,6 @@ $ans5 = String("R=cba")->cmp( ); ## Display question -TEXT(beginproblem()); - BEGIN_PGML Suppose Prolog has read the following database. diff --git a/Contrib/LaTech/ProgrammingLanguages/PrologSet4_Recursion/q1_recursion1.pg b/Contrib/LaTech/ProgrammingLanguages/PrologSet4_Recursion/q1_recursion1.pg index f81b76f4cb..9c533096c3 100644 --- a/Contrib/LaTech/ProgrammingLanguages/PrologSet4_Recursion/q1_recursion1.pg +++ b/Contrib/LaTech/ProgrammingLanguages/PrologSet4_Recursion/q1_recursion1.pg @@ -18,9 +18,9 @@ DOCUMENT(); ## Load libraries loadMacros( "PGstandard.pl", -"PGcourse.pl", "contextArbitraryString.pl", -"PGML.pl" +"PGML.pl", +"PGcourse.pl" ); ## Change context to strings answers @@ -91,8 +91,6 @@ $ans5 = String("R=$a5")->cmp( ); ## Display question -TEXT(beginproblem()); - BEGIN_PGML Suppose Prolog has read the following database. diff --git a/Contrib/LaTech/ProgrammingLanguages/PrologSet4_Recursion/q2_recursion2.pg b/Contrib/LaTech/ProgrammingLanguages/PrologSet4_Recursion/q2_recursion2.pg index 249d7088b3..3599922d33 100644 --- a/Contrib/LaTech/ProgrammingLanguages/PrologSet4_Recursion/q2_recursion2.pg +++ b/Contrib/LaTech/ProgrammingLanguages/PrologSet4_Recursion/q2_recursion2.pg @@ -18,9 +18,9 @@ DOCUMENT(); ## Load libraries loadMacros( "PGstandard.pl", -"PGcourse.pl", "contextArbitraryString.pl", -"PGML.pl" +"PGML.pl", +"PGcourse.pl" ); ## Change context to strings answers @@ -90,8 +90,6 @@ $ans5 = String("R=$a5")->cmp( ); ## Display question -TEXT(beginproblem()); - BEGIN_PGML Suppose Prolog has read the following database. diff --git a/Contrib/LaTech/ProgrammingLanguages/PrologSet4_Recursion/q3_recursion3.pg b/Contrib/LaTech/ProgrammingLanguages/PrologSet4_Recursion/q3_recursion3.pg index 253d360cf2..fef67d009a 100644 --- a/Contrib/LaTech/ProgrammingLanguages/PrologSet4_Recursion/q3_recursion3.pg +++ b/Contrib/LaTech/ProgrammingLanguages/PrologSet4_Recursion/q3_recursion3.pg @@ -18,9 +18,9 @@ DOCUMENT(); ## Load libraries loadMacros( "PGstandard.pl", -"PGcourse.pl", "contextArbitraryString.pl", -"PGML.pl" +"PGML.pl", +"PGcourse.pl" ); ## Change context to strings answers @@ -101,8 +101,6 @@ $ans5 = String("R=$a5")->cmp( ); ## Display question -TEXT(beginproblem()); - BEGIN_PGML Suppose Prolog has read the following database.