655 results authored by Christian Lawson-Perfect - search across all users.
-
Question in Demos
A demo of the match choices with answers part and its options.
-
Question in Demos
This shows how to take an expression given by the student and plot the implicit curve of points where it equals zero.
-
Question in How-tos
When saving the data necessary to resume an attempt, Numbas only saves the values of variables which use the random number generator.
If you naively generate a large random sample in one variable, it'll be marked as a source of randomness so Numbas will save every value in the sample. Loading this value when you resume the attempt can be very slow.
Instead, you can generate a seed value in one variable and then use it with the seedrandom function in the variable that stores your random list. Only the value of the seed needs to be saved.
-
Question in How-tos
The diagram contains a line and a hidden glider on that line.
The JavaScript preamble adds a callback which shows the glider when the question advice is displayed.
-
Question in How-tos
Shows how to use the lpad function to format a time in HH:MM format so that leading zeros are used for numbers less than 10.
-
Question in How-tos
The CSS preamble adds a vertical line down the input for part b, to separate the two parts of the matrix.
-
Question in Demos
A custom marking algorithm on the spreadsheet part changes it to interpret quantities in cells, so they can be compared to the expected answer.
In real use, you'd probably want more sophisticated logic, to give better feedback or to allow partial marks for different units, like the "quantity with units" part type does.
-
Question in Getting Started
This question contains information on how Numbas works, from the beginning of an exam to the end.
Note: it was written for students who access Numbas exams through the Numbas LTI provider. Some of the information does not apply to standalone exams, or those delivered through a generic SCORM player.
-
Question in How-tos
Do not use this: adaptive marking is the best way to access the student's answer to another part.
Shows how to retrieve the student's answer to another part from a custom marking script.
-
Question in How-tos
You can use LaTeX in marking comments, but remember to escape backslashes!
-
Question in Demos
This easy question is intended to be used by administrators to test the integration of Numbas with a learning environment.
-
Question in QIT ICAs
The student is shown a circuit diagram with three logic gates. It's always in the form (a OP b) OP (b OP c).
They have to fill in a truth table for the circuit. There is a step which expands the truth table, adding a column for each of the first two gates.
-
Question in How-tos
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 in Demos
Taken from question 37 of the book Problem Solving in GCSE Mathematics by Daniel Griller.
Given bearings and lengths of two straight lines, work out the bearing and distance back to the starting point.
A Eukleides diagram shows the setup visually.
-
Question in DemosAn interactive experiment about probability: the student must first 'design' the experiment by deciding how many times they're going to flip a coin, and define what number of heads would make them believe the coin is biased. They must then enter the results of their coin flips, calculate the percentage of heads, and finally decide if the coin is biased, using the condition they specified in the design stage. There are optional hints at each stage.
-
Question in Demos
A demonstration of embedding various kinds of media in a question.
-
Exam (8 questions) in Demos
Some questions which use JSXGraph to create interactive graphics.
-
Question in DIAGNOSYS
No description given
-
Question in How-tos
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 in Christian's workspace
Explore mode question guiding you through the steps of the "I can name your polynomial" trick.
-
Question in How-tos
Shows two different ways
-
Question in How-tos
Shows how to mark a boolean expression, by checking all possible values of the free variables. There's an information step containing a reminder of the syntax for boolean operations.
-
Question in Demos
A demo of the mathematical expression part and its options.
-
Question in How-tos
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 in Christian's workspace
A calculator to convert between Roman coin denominations: you specify how many of a denomination you've got, and what denomination you want to convert to, and it shows you the
-
Question in Debugging other people's stuff
The student has to write the general solution of a 2nd order PDE. They can choose the names of their arbitrary functions of $x$ and $y$.
The marking algorithm finds the names of the functions of $x$ and $y$ in the student's answer, and replaces them with $\sin(x)$ and $\cos(y)$ (these could be changed) so that the expression can be evaluated.
-
Question in How-tos
Example showing how to mark a "choose one from a list" part where the student has to pick the range a given number lies in.
-
Question in Demos
In the first part, the student is asked to enter dimensions of a box in a spreadsheet.
The values are extracted as a list of numbers by changing the interpreted_answer note in the first part's marking algorithm, and the calculated volume is used as the answer to the second part, through adaptive marking.
-
Question in How-tos
The student is asked to enter a given matrix, but they're only required to fill in the upper triangle.
A custom marking algorithm fills in any empty cells in the lower triangle of the student's answer with the corresponding cell in the upper triangle.
The student is still warned if they leave any cells empty in the upper triangle.
-
Question in How-tos
This demonstrates how to:
- Generate a fixed number of observations of data in two categories.
- Display the data in a table, with row and column totals.
- Ask the student to enter the data in a spreadsheet which is automatically marked.