Created
January 19, 2012 10:10
-
-
Save BillFoster/1639215 to your computer and use it in GitHub Desktop.
string restrictions and pattern matching
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Here is a question gapfill part on prime factorisation, pi primes, ei their exponents. | |
Awful business trapping student input. | |
So much better if there were restrictions that said that the primes (without 0 exponent) had to be present in the answer. | |
gaps: [ | |
{type: jme | |
answer: "{p1}^{e1}*{p2}^{e2}*{p3}^{e3}*{p5}^{e5}" | |
answersimplification:"unitPower,zeroPower,unitFactor" | |
musthave:{ | |
strings:[*,^] | |
message:"split into factors, each factor a power of a prime number and include the multiplication sign * between the factors " | |
} | |
notallowed:{ | |
strings:["1^","1*",*1",/,"-","^0"] | |
message: "split into factors, each factor a power of a prime number and include the multiplication sign * between the factors" | |
} | |
minlength:{length:11} | |
marks:1 | |
} | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment