107 results in Howtos  search across all projects.

Question
Use the numbro.js extension to format numbers and currencies.

QuestionThis question shows that you can set the number of marks available for a part to a fraction. The total available for the question is 1 mark.

Question
The custom function
rectangle(width,height)
draws a rectangle with the given dimensions, along with some labels. 
Question
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.

QuestionThis question generates two variables, a and b. They're chosen to be distinct, and neither takes the value zero.

Question
An allornothing marking scheme for a gapfill 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.

Question
Just showing how to use the stdev function from the stats extension to calculate the standard deviation of a list of numbers.

Question
The student must enter a number in scientific notation, with separate boxes for significand and exponent. They only get the marks if both elements are correct.

Question
A short demonstration of when the basic simplification rules are turned on, or off.

Question
Example of displaying a randomly chosen image.

Question
Shows how the \text command is rendered using the plaintext font, not the LaTeX one. Useful for displaying units of measurement and English words inside equations.

Question
Demo question showing how to use the matrix maths functions in JavaScript.

Question
This question shows how to display a number like "1234" as "1,234", or "1 234", using the formatNumber function.

Question
Create a list of records for randomlygenerated people. Each record contains the person's name, age, and list of hobbies.
The names and hobbies are generated from JSON data.

Question
Get the student to upload their experimental data in a CSV file, then ask them to compute statistics on it.

Question
Demonstrates that the marking algorithm for "match text pattern" parts doesn't put quotes around substituted strings any more.

Question
Defines a custom function sort_by to sort a list of lists by the elements at the given index.
You could do a similar thing to sort lists of dictionaries.

Question
Demo showing how to write a custom function in javascript.

Question
A function which renders the factorisation of a number in LaTeX.

Question
This question is out of date: use the currency function instead.

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

Question
Choose from one of several predefined scenarios, and set variables to the corresponding values, defined in lists.
This question has three variables:
city
,population
, andpercent_like_chocolate
. These differ for each city. We've defined a list for each variable, with the corresponding values. A variable calledscenario
picks a random position in the list, so the value ofcity
, for example, iscities[scenario]
. 
Question
Use attributes of the form
eval<name>
to dynamically set an attribute on an element based on question variables. 
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
No description given