63 results in How-tos - search across all projects.
-
Question
The student has to enter three different letters of the alphabet in the three gaps. Their answer is marked as a set: repeated answers only count as one answer.
Each gap has the same custom marking algorithm which marks that gap as correct if the student's answer is in the set of acceptable answers.
-
Question
This question models an experiment: the student must collect some data and enter it at the start of the question, and the expected answers to subsequent parts are marked based on that data.
The student's values of the variables width, depth and height are stored once they move on from the first part.
-
Question
This question models an experiment: the student must collect some data and enter it at the start of the question, and the expected answers to subsequent parts are marked based on that data.
A downside of working this way is that you have to set up the variable replacements on each part of the question. You could avoid this by using explore mode.
-
Question
The student is given a quadratic formula and asked to fill in a table of values of $f(x)$ for a given range of $x$.
There is also a plot of the points, which updates when the table is filled in, or the student can move the points to fill in the table.
The table uses the spreadsheet and JSXgraph extensions.
-
Question
The student is given a quadratic formula and asked to fill in a table of values of $f(x)$ for a given range of $x$.
The table uses the spreadsheet extension.
-
Question
This question shows how explore mode can be used to loop through several versions of the same question. The variables for each version are stored in a list of "scenarios", and a counter works through that list each time the student moves on to the next part, labelled "try the next version of this question".
-
Question
The answer to this question is a differential equation involving $y''$, $y'$ and $y$.
A variable value generator for $y$ ensures that the right values are tested to check that the student's answer is equivalent to the expected equation.
-
Question
This question includes a JavaScript preamble which defines 'hbar' as a special variable name to be rendered in LaTeX as \hbar.
-
QuestionThis question demonstrates how to use the \simplify command to create natural-looking randomised mathematical expressions.
-
Question
A line with random $x$- and $y$- intercepts is plotted, and you have to drag two dots over the points where the line crosses the $x$ and $y$ axes.
-
Question
The student is asked to find the square root of an integer of the form $\pm n^2$. If the root is not real, they should enter "nan".
A custom marking algorithm extends the built-in one to deal with "nan".
There's some custom javascript to set the expected answer correctly. In the future this will be possible in the marking algorithm - see https://github.com/numbas/Numbas/issues/856
-
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.
-
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.
Using the decimal data type, there's no loss of precision, so the correct value is produced.
-
Question
Pick from the range -5..5, but make 0 more likely.
-
Question
Demonstrates how to set up a "choose one from a list" part where the number of choices is randomised.
The part is given a list of labels for the choices as well as a list specifying the marks to award for each choice.
-
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
A short demonstration of when the basic simplification rules are turned on, or off.
-
Question
Shows how the \text command is rendered using the plain-text font, not the LaTeX one. Useful for displaying units of measurement and English words inside equations.
-
QuestionThe statement of this question demonstrates how you can control the \simplify command's behaviour by specifying the rules to use.
-
Question
A diagram showing the difference between lines, rays and segments in Eukleides.
-
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.
-
Exam (1 question)
This exam uses a custom theme which provides a new logo image.
-
QuestionShows how to use the sqrtSquare simplification rule to display a randomly-chosen fraction involving surds on either the top or bottom.
-
Question
This shows how to use variable name annotations inside \simplify to display a 3D vector in terms of the standard unit vectors $\boldsymbol{i}$, $\boldsymbol{j}$, $\boldsymbol{k}$
-
Question
The student is asked to write a number with a certain property, or tick a box labelled "this is impossible" if it can't be done.
A custom marking algorithm on the gap-fill part first checks if the student ticked the box. If they did, their answer is marked correct if it really is impossible. If they didn't tick it, their number is checked against the required property.
-
Question
Demo showing how to write a custom function in javascript.
-
Question
This question shows how to run some JavaScript code when the question's HTML is displayed on the page.
-
Question
This question shows how to use the 'adviceDisplayed' signal to run some javascript when the question's advice is revealed to the student.
-
Question
This shows how to implement a recursive function in JavaScript with a nested function definition.
-
Question
The student must write a percentage, using the % symbol. An alternative answer checks the cases where they forgot the percent sign (e.g. 55), or entered the corresponding scalar (e.g. 0.55).