62 results in How-tos - search across all projects.
-
Question
The student is given a value of $\cos(\theta)$ and has to find $\theta$.
Shows how to use subexpressions to represent randomly-chosen fractions of $\pi$ and surds, and have them displayed nicely.
-
Question
This shows how to define a question variable whose value is a variable name with a few annotations added, so it's more convenient to use.
The question variable 'x' is defined to be the variable name
vec:underline:x
. -
Question
To prevent students from giving a trivial answer for a part which is used later in adaptive marking, you can consider it as invalid.
Part a of this question has a custom marking algorithm which marks an answer of zero as invalid. Any other answer is used in adaptive marking for part b.
-
QuestionA custom marking algorithm picks out the names of the constants of integration that the student has used for the $\cos$ and $\sin$ terms in their answer, and replaces them with $A$ and $B$ respectively, before comparing with the correct answer. This way, the student is free to choose the names for their constants of integration.
-
Question
Use the bareMatrices display flag to render a matrix without wrapping it in parentheses.
-
Question
This question uses a "formatted text template" variable to define a long passage of text which is shown to the student after they submit a part. A custom marking algorithm adds the text as a comment after the standard marking algorithm has finished.
-
Question
The gap-fill part in this question is only marked correct if both gaps are correct.
The feedback from the individual gaps is not shown.
-
Question
A custom marking algorithm for a JME part estabishes whether the student's answer is equivalent to the expected answer, up to an arbitrary constant factor.
-
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
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.
-
QuestionThis question generates two variables, a and b. They're chosen to be distinct, and neither takes the value zero.
-
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.
-
Exam (3 questions)
These questions show how to use JSON data to represent structured information.
-
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
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 calledscenario
picks a random position in the list, so the value ofcity
, for example, iscities[scenario]
. -
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
This question shows how to ask for a number in scientific notation, by asking for the significand and exponent separately and using a custom marking algorithm in the gap-fill part to put the two pieces together.
Answers not in standard form, i.e. with a significand not in $[1,10)$, are accepted but given partial marks.
-
Question
A randomly generated list of numbers is shown to the student. They must tick every occurrence of the lowest number. The number of occurrences isn't always the same - sometimes the minimum is unique and sometimes it is repeated. The
map
function makes it easy to construct a marking matrix. -
Question
The student has to compute $a^b$ and $b^a$, then decide which of the two is bigger.
This question shows how to set up a custom marking matrix for the "choose one from a list" part, based on values used elsewhere in the question. It could use adaptive marking to use the student's incorrect values for the comparison, but doesn't at the moment.
-
Question
A "match choices with answers" part where the student either gets all the marks or none. Any incorrect choice is penalised with a huge negative mark, so they end up with the minimum mark of 0.
-
Question
A mathematical expression part whose answer is the product of two matrices, $X \times Y$.
By setting the "variable value generator" option for $X$ and $Y$ to produce random matrices, we can ensure that the order of the factors in the student's answer matters: $X \times Y \neq Y \times X$.
-
QuestionThis question contains a single "match text pattern" part which accepts anything you type into it.
-
Exam (2 questions)
This exam turns off all the feedback options, so students know nothing about how they've done.
-
Question
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.