Skip to content

Instantly share code, notes, and snippets.

@christianp
Forked from BillFoster/gist:1143713
Created August 16, 2011 11:12
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save christianp/1148867 to your computer and use it in GitHub Desktop.
Save christianp/1148867 to your computer and use it in GitHub Desktop.
Complex numbers and display/simplification
{
name: testcom
questions: [
{
name: Complex Test
statement: """Express the following in the form $a+bi$ where $a$ and $b$ are real. """
variables: {
a4: "s4*random(1..9)"
b4: "s1*random(1..9)"
a5: "s4*random(1..9)"
b5: "s1*random(1..9)"
s4: "random(1,-1)"
s1: "random(1,-1)"
}
parts:[
{
type: GapFill
prompt: """$\simplify[all]{({a4}+{b4}*i)/({a5}+{b5}*i)} = \;\;$[[0]]."""
gaps: [
{type: jme
answer: "{(a4+b4*i)/(a5+b5*i)}"
answersimplification:"all,fractionNumbers"
marks: 1
checkingType: AbsDiff
}
]
}
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment