95 results in Howtos  search across all projects.

Question
A couple of different ways of showing the correct answer to a single part as soon as the student submits an answer. One way allows the student to change their answer, while the other locks the part.
A third part includes a "reveal answers to this part" button, which allows the student to choose to reveal the answer to the part.
Think very carefully before using this: by revealing the answer, you are removing the opportunity for the student to later on realise they've got that step wrong, as a consequence of some further work. It's often possible to use adaptive marking to use the student's answer in place of the correct answer in later parts.

Question
Give the student a larger area to write some freeform text, which isn't marked.

Question
Ask for the squares of five randomlychosen numbers between 0 and 15.
The shuffle function puts a list in random order.

Question
Some clever variablesubstitution trickery to randomly pick two sides of a rightangled 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.

Question
A method of randomly choosing variable names  use the
expression()
JME function to create a variable name from a randomly chosen string.(This question also uses a custom marking script to check that the student has simplified the expression)

Question
One method of randomly choosing names for variables. For each variable, we have 4 options. Create a list of 4 numbers, which is 1 for the name we want to use, and 0 otherwise.
Then, whenever we use that variable, multiply each of the possible names by the corresponding number in the list. When the expression is simplified, the unwanted names will cancel to 0, leaving only the name we want.
This is quite clunky!
(This question also uses a custom marking script to check that the student has simplified the expression)

Question
The function randexp, provided by an extension, generates a random string matching the given regular expression.

Question
No description given

Question
No description given

Question
Shows how to use the JME function lpad to add zeros to the beginning of a number so it's always displayed using two digits.

Question
Use the CSS preamble to give a bit more space between multiple choice answers.

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
Use the numbro.js extension to format numbers and currencies.

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
Demonstrates how to create variables containing LaTeX commands, and how to use them in the question text.