Skip to content

Instantly share code, notes, and snippets.

@christianp
Created June 8, 2011 21:12
Show Gist options
  • Save christianp/1015415 to your computer and use it in GitHub Desktop.
Save christianp/1015415 to your computer and use it in GitHub Desktop.
fraction numbers in answer question
{
name: Fractions test
questions: [
{
name: Question 4
variables: {
a: "sa*random(1..9)"
b: "sb*random(1..9)"
c: "sc*random(1..9)"
sa: "random(1,-1)"
sb: "random(1,-1)"
sc: "random(1,-1)"
a1: "random(1..9)"
b1: "if(a*b2=a1*b,b2+1,b2)"
c1: "sc1*random(1..9)"
s1:"random(1,-1)"
sc1:"random(1,-1)"
b2: "random(2..9)"
}
statement: """
Solve the simultaneous equations for $x$ and $y$. Input your answers as fractions NOT as decimals.
"""
parts: [
{
type: GapFill
prompt: """
\[ \begin{eqnarray}
\simplify[1111110111111111]{{a}x+{b}y}&=&\var{c}\
\simplify[1111110111111111]{{a1}x+{b1}y}&=&\var{c1}
\end{eqnarray}
\]
$x=\;$[[0]]
$y=\;$[[1]]
"""
gaps: [
{type: jme
answer: "{c*b1-b*c1}/{b1*a-a1*b}"
answersimplification: "1111111111111111"
notallowed:{strings:[.],message: input as a fraction or an integer not as a decimal}
marks: 1}
{type: jme
answer: "{c*a1-a*c1}/{b*a1-a*b1}"
answersimplification: "1111111111111111"
notallowed:{strings:[.],message: input as a fraction or an integer not as a decimal}
marks:1}
]
}
]
advice: """
This
"""
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment