161 results in How-tos - search across all projects.
-
Question
This question shows how to load a GeoGebra applet in JavaScript, avoiding the JME functions. This allows you to do some more complicated manipulation of the worksheet than simply redefining objects.
-
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.
-
QuestionThe matrix entry part in this question marks any symmetric matrix as correct, using a custom marking algorithm. A matrix is symmetric if it is equal to its transpose.
-
Question
No description given
-
Question
Choose from one of several pre-defined scenarios, and set variables to the corresponding values.
This question has three variables:
city,population, andpercent_like_chocolate. These differ for each city. -
Question
An example of using the GeoGebra extension to ask the student to create a geometric construction, with marking and steps.
-
Question
This question contains a "choose several answers" part which has an "all-or-nothing" mark scheme: the student is only awarded marks if they tick all of the correct choices, and no incorrect choices.
-
Question
Display a number as a mixed fraction when appropriate, using the mixedFractions display option.
-
Question
The function randexp, provided by an extension, generates a random string matching the given regular expression.
-
Question
Update: you can now use the conditional visibility button to do this more easily - see the documentation.
If the statement or advice for your question differs greatly depending on a random variable (for instance, if you're picking from a selection of scenarios), you only want to show content for the relevant scenario.
This question shows one way of doing that.
-
Question
This question is out of date: use the currency function instead.
-
Question
Display a number like "1234" as "1,234".
This question is out of date: the formatnumber function can format numbers using several different notational styles.
-
Question
Use the numbro.js extension to format numbers and currencies.
-
Question
The custom function
rectangle(width,height)draws a rectangle with the given dimensions, along with some labels. -
QuestionThis question generates two variables, a and b. They're chosen to be distinct, and neither takes the value zero.
-
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
Create a list of records for randomly-generated people. Each record contains the person's name, age, and list of hobbies.
The names and hobbies are generated from JSON data.
-
Question
A function which renders the factorisation of a number in LaTeX.
-
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 pre-defined 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 calledscenariopicks a random position in the list, so the value ofcity, for example, iscities[scenario]. -
Question
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.
-
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
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
This question adds a CSS rule to hide the brackets around the matrix input.
-
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.
-
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
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.