Created
August 13, 2011 10:23
-
-
Save BillFoster/1143713 to your computer and use it in GitHub Desktop.
Complex numbers and display/simplification
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
{ | |
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{({a4}+{b4}*i)/({a5}+{b5}*i)}$=[[0]].""" | |
gaps: [ | |
{type: jme | |
answer: "({a4+b4*i})/({a5+b5*i})" | |
answersimplification:"1111111111111111" | |
marks: 1 | |
checkingType: AbsDiff | |
} | |
] | |
} | |
] | |
} | |
] | |
} |
I'm confused. Why isn't this using the new syntax?
Don't know! Seems to be a problem with the answer display only in this particular mode for complex numbers in the answer ({a4+b4_i})/({a5+b5_i}).
In the main body (prompt and statement) all is displayed correctly.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Switch the collectNumbers (7th switch) off and one and reveal answer in both cases. Clearly a problem when switched off. Also as 16th bit is switched on was expecting fraction display.