Skip to content

Commit

Permalink
stack library rearranging
Browse files Browse the repository at this point in the history
  • Loading branch information
hayden-MB committed Feb 5, 2025
1 parent cd2ef52 commit 2de88e1
Show file tree
Hide file tree
Showing 30 changed files with 42 additions and 54 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
<text>Parsons-4-DAG-Proof 3*2^172 + 1</text>
</name>
<questiontext format="html">
<text><![CDATA[<p>Prove the following theorem by dragging sentences and arranging them in the correct order.</p>
<p><b>Theorem:</b> {@thm@}</p>
[[parsons input="ans1"]]
{# parsons_encode(proof_steps) #}
[[/parsons ]]
<text><![CDATA[<p>Prove the following theorem by dragging sentences and arranging them in the correct order.</p>
<p><b>Theorem:</b> {@thm@}</p>
[[parsons input="ans1"]]
{# parsons_encode(proof_steps) #}
[[/parsons ]]
<p>[[input:ans1]] [[validation:ans1]]</p>]]></text>
</questiontext>
<generalfeedback format="moodle_auto_format">
<text><![CDATA[<p><b>Theorem:</b> {@thm@}</p>
<text><![CDATA[<p><b>Theorem:</b> {@thm@}</p>
{@proof_display(ta, proof_steps)@}]]></text>
</generalfeedback>
<defaultgrade>1</defaultgrade>
Expand All @@ -25,28 +25,28 @@
<text>2024112000</text>
</stackversion>
<questionvariables>
<text><![CDATA[stack_include("contribl://prooflib.mac");
thm: "If \\(3 \\cdot 2^{172} + 1\\) is a perfect square, then \\(3 \\cdot 2^{172} + 173\\) is not a perfect square.";
proof_steps: [
["S1", "Assume that \\(3 \\cdot 2^{172} + 1\\) is a perfect square."],
["S2", "There is a positive integer \\(k\\) such that \\(3 \\cdot 2^{172} + 1 = k^2\\)."],
["S3", "\\(k^2 = 3 \\cdot 2^{172} + 1 < 3 \\cdot 2^{172} + 173\\)."],
["S4", "Since \\(3 \\cdot 2^{172} + 1 > 2^{172} = (2^{86})^2 > 172^2\\), we have \\(k > 172\\)."],
["S5", "\\(3 \\cdot 2^{172} + 173 = (3 \\cdot 2^{172} + 1) + 172 < k^2 + k < (k + 1)^2\\)."],
["C6", "Since \\(k^2 < 3 \\cdot 2^{172} + 173 < (k + 1)^2\\) it is strictly between two successive squares \\(k^2\\) and \\((k + 1)^2\\), it cannot be a perfect square."]
];
/* Because of interleaving, we have to add in another "ta2" proof. */
ta: proof("S1", "S2", proof_c(proof("S4", "S5"), proof("S3")), "C6");
ta2: proof("S1", "S2", "S4", "S3", "S5", "C6");
tal:proof_alternatives(ta);
tas:setify(map(proof_flatten, tal));
/* This graph represents the teacher's answer. */
tdag: [["S1", "S2", "S4", "S5", "C6"],
["S1", "S2", "S3", "C6"]];
<text><![CDATA[stack_include("contribl://prooflib.mac");
thm: "If \\(3 \\cdot 2^{172} + 1\\) is a perfect square, then \\(3 \\cdot 2^{172} + 173\\) is not a perfect square.";
proof_steps: [
["S1", "Assume that \\(3 \\cdot 2^{172} + 1\\) is a perfect square."],
["S2", "There is a positive integer \\(k\\) such that \\(3 \\cdot 2^{172} + 1 = k^2\\)."],
["S3", "\\(k^2 = 3 \\cdot 2^{172} + 1 < 3 \\cdot 2^{172} + 173\\)."],
["S4", "Since \\(3 \\cdot 2^{172} + 1 > 2^{172} = (2^{86})^2 > 172^2\\), we have \\(k > 172\\)."],
["S5", "\\(3 \\cdot 2^{172} + 173 = (3 \\cdot 2^{172} + 1) + 172 < k^2 + k < (k + 1)^2\\)."],
["C6", "Since \\(k^2 < 3 \\cdot 2^{172} + 173 < (k + 1)^2\\) it is strictly between two successive squares \\(k^2\\) and \\((k + 1)^2\\), it cannot be a perfect square."]
];
/* Because of interleaving, we have to add in another "ta2" proof. */
ta: proof("S1", "S2", proof_c(proof("S4", "S5"), proof("S3")), "C6");
ta2: proof("S1", "S2", "S4", "S3", "S5", "C6");
tal:proof_alternatives(ta);
tas:setify(map(proof_flatten, tal));
/* This graph represents the teacher's answer. */
tdag: [["S1", "S2", "S4", "S5", "C6"],
["S1", "S2", "S3", "C6"]];
proof_steps:random_permutation(proof_steps);]]></text>
</questionvariables>
<specificfeedback format="html">
Expand Down Expand Up @@ -103,8 +103,8 @@ proof_steps:random_permutation(proof_steps);]]></text>
<autosimplify>1</autosimplify>
<feedbackstyle>1</feedbackstyle>
<feedbackvariables>
<text>sa:parsons_decode(ans1);
saprob: proof_assessment_dag(sa, tdag) ;
<text>sa:parsons_decode(ans1);
saprob: proof_assessment_dag(sa, tdag) ;
[pd, saa]:proof_assessment(sa, proof_alternatives(ta));</text>
</feedbackvariables>
<node>
Expand All @@ -129,7 +129,7 @@ saprob: proof_assessment_dag(sa, tdag) ;
<falsenextnode>1</falsenextnode>
<falseanswernote>prt1-1-F</falseanswernote>
<falsefeedback format="html">
<text><![CDATA[<b>You need to modify your proof as follows:</b><br/>
<text><![CDATA[<b>You need to modify your proof as follows:</b><br/>
{@proof_dag_problem_display(saprob, poof_steps)@}]]></text>
</falsefeedback>
</node>
Expand All @@ -155,7 +155,7 @@ saprob: proof_assessment_dag(sa, tdag) ;
<falsenextnode>-1</falsenextnode>
<falseanswernote>prt1-2-F</falseanswernote>
<falsefeedback format="html">
<text><![CDATA[<br/><b>This shows how to modify your proof to get a correct proof.</b><br/>
<text><![CDATA[<br/><b>This shows how to modify your proof to get a correct proof.</b><br/>
{@proof_assessment_display(saa, proof_steps)@}]]></text>
</falsefeedback>
</node>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
<text>Serving out data: download file</text>
</name>
<questiontext format="html">
<text><![CDATA[[[comment]]Use them like this in the question-text.[[/comment]]
<p>Load the data from
<a href="[[textdownload name="data.csv"]]{@stack_csv_formatter(data,lab)@}[[/textdownload]]">this file</a> and calculate the mean of data set \(A\).</p>
<text><![CDATA[[[comment]]Use them like this in the question-text.[[/comment]]
<p>Load the data from
<a href="[[textdownload name="data.csv"]]{@stack_csv_formatter(data,lab)@}[[/textdownload]]">this file</a> and calculate the mean of data set \(A\).</p>
<p>[[input:ans1]] [[validation:ans1]]</p>]]></text>
</questiontext>
<generalfeedback format="moodle_auto_format">
Expand All @@ -22,13 +22,13 @@
<text>2023010401</text>
</stackversion>
<questionvariables>
<text><![CDATA[/* Define these in question variables: */
lab: ["A","B","C"];
data: makelist([rand(322)/100.0,rand(600)/100.0,rand(300)/100.0], i, 50);
/* And make a question. */
taA: mean(map(first,data));
taB: mean(map(second,data));
taC: mean(map(third,data));
<text><![CDATA[/* Define these in question variables: */
lab: ["A","B","C"];
data: makelist([rand(322)/100.0,rand(600)/100.0,rand(300)/100.0], i, 50);
/* And make a question. */
taA: mean(map(first,data));
taB: mean(map(second,data));
taC: mean(map(third,data));
]]></text>
</questionvariables>
<specificfeedback format="html">
Expand Down

This file was deleted.

0 comments on commit 2de88e1

Please sign in to comment.