16 results in How-tos - search across all projects.
Use student input in a JSXGraph diagram Ready to useQuestion
There are copious comments in the definition of the function eqnline about the voodoo needed to have a JSXGraph diagram interact with the input box for a part.
Use canvas to draw a rectangle Ready to useQuestion
The custom function
rectangle(width,height)draws a rectangle with the given dimensions, along with some labels.
All gaps must be correct Ready to useQuestion
An all-or-nothing marking scheme for a gap-fill part: the student must answer every gap correctly to get all the marks. If any gap is incorrect they get 0 marks for the whole part.
Standard deviation of a list of numbers Ready to useQuestion
Just showing how to use the stdev function from the stats extension to calculate the standard deviation of a list of numbers.
Variable number of choices in a multiple choice part Ready to useQuestion
No description given
Using a randomly chosen image Ready to useQuestion
Example of displaying a randomly chosen image.
Use data uploaded by the student Ready to useQuestion
Get the student to upload their experimental data in a CSV file, then ask them to compute statistics on it.
Show the prime factorisation of a number Ready to useQuestion
A function which renders the factorisation of a number in LaTeX.
Show all the factors of a number Ready to useQuestion
Show a list of the factors of a number.
Works by testing each number up to $n$ for divisibility by $n$, so won't do well with really big numbers. Certainly fast enough for numbers up to 4 or 5 digits.
Some clever variable-substitution trickery to randomly pick two sides of a right-angled triangle to give to a student, and ask for the other.
The sides are set up so they're always Pythagorean triples, and the opposite side is always odd.
As ever, most of the tricky stuff is in the advice.
Because this was created quickly to show how to set up the randomisation, there's no diagram. It would benefit greatly from a diagram.
Different styles of number notation Ready to useQuestion
Numbas can now understand and use several different styles of notation for numbers.
This question shows off all the supported styles, both for display in text and in the answers to number entry parts.
Conditional visibility Ready to useQuestion
Show one of several blocks of text depending on the value of a question variable.
As well as a simple check for the value of a variable, the condition to display a block of text can be a complex expression in any of the question variables - in this example, depending on the discriminant of the generated quadratic.
Pattern matching - factorise an equation Ready to useQuestion
The student is asked to factorise a quadratic $x^2 + ax + b$. A custom marking script uses pattern matching to ensure that the student's answer is of the form $(x+a)(x+b)$, $(x+a)^2$, or $x(x+a)$.
To find the script, look in the Scripts tab of part a.
Shows how to retrieve the student's answer to another part from a custom marking script.
Custom marking script for "choose one from a list" Ready to useQuestion
A very simple example of a custom marking script for a "choose one from a list" part
Construct a line through two points in a GeoGebra worksheet. Change the line by setting the positions of the two points when the worksheet is embedded into the question.