106 results in Howtos  search across all projects.

Question
No description given

Question
Using a shuffled list variable to randomise the order of all options in a multiple choice part except the last one.

Question
No description given

Question
Because JavaScript numbers lose precision as they get bigger, you get some unexpected results. See the variable "two"  the difference should be 2, but because the JavaScript representation of each of the two numbers is the same, it thinks the difference is 0.

Question
Shows how to enter a logarithm to an arbitrary base, in a mathematical expression part.

Question
Load data about members of the Scottish parliament from a JSON object, and display a table of 5 randomly picked MSPs.

Question
Load data on some items held in the Cooper Hewitt collection, and show a table of 5 randomly picked items.

QuestionShows how to safely include LaTeX in a string variable.

Question
You can use LaTeX in marking comments, but remember to escape backslashes!

Question
A table showing how to substitute raw LaTeX code into question text.
NOTE: You probably don't want to do this! There's usually a more robust way, where you get Numbas to make the expression for you.

Question
This question adds a CSS rule to hide the brackets around the matrix input.

Question
Lay out gapfills so the student has to enter either the numerator or denominator of a fraction.

Question
Some custom CSS restyles the matrix input so it looks like a fraction, with input boxes on top and bottom.
Ideally, there should be a fraction input part type, or an option for the number entry part to display a fraction input.

Question
Given an ascending sequence of numbers, finds the index in the sequence of the first number greater than or equal to a given value.

QuestionThe student must expand an expression of the form $(x+a)(x+b)(x+c)$. A pattern restriction ensures there are no brackets in their answer.

Question
This question uses the vis.js library to plot 3D functions and data sets.
As well as JME functions to make plots, you can use javascript functions to get more control over how the plots are rendered.

QuestionShows how to use the sqrtSquare simplification rule to display a randomlychosen fraction involving surds on either the top or bottom.

Question
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.

Question
No description given

Question
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.

Question
Pick from the range 5..5, but make 0 more likely.

Question
Call a custom function from another javascript custom function by using
scope.evaluate

Question
One way of checking an equation is valid is to check that the difference between the LHS and RHS is 0.

Question
In progress!

Question
No description given

Question
Student is asked whether a quadratic equation can be factorised. If they say "yes", they're asked to give the factorisation.

Question
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.

Question
Wrap the student's answer in
set()
so it's marked as a set. 
Question
This question asks the student to give a function with a particular root. It then asks them to divide by (x{root}), and uses adaptive marking to mark against the previous answer.
This uses the "expression" data type, which is currently undocumented and experimental.

Question
A couple of different ways of asking the student to enter a large number, to get around the floating point imprecision problem.