148 results in How-tos - search across all projects.
-
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
Obosolete: there's now a built-in function
sort_by
.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
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.
-
Question
You can use LaTeX in marking comments, but remember to escape backslashes!
-
QuestionThe statement of this question demonstrates how you can control the \simplify command's behaviour by specifying the rules to use.
-
Question
Should not be used: there's now a built-in function
frequencies
.This question randomly generates a list of 100 items, each chosen from a list of strings.
It then computes the number of occurrences of each distinct item in the list. The statement shows the frequencies in a table.
-
Question
This question uses the vis.js library to plot 3D functions and data sets.
As well as JME functions to make plots, you can use javascript functions to get more control over how the plots are rendered.
-
Question
No description given
-
Question
No description given
-
Question
This question shows how to load a GeoGebra applet from geogebra.org.
-
Question
A diagram showing the difference between lines, rays and segments in Eukleides.
-
Question
Give the student a larger area to write some free-form text, which isn't marked.
-
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.
-
Question
Lay out gapfills so the student has to enter either the numerator or denominator of a fraction.
-
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
Call a custom function from another javascript custom function by using
scope.evaluate
-
Question
Demo question showing how to use the matrix maths functions in JavaScript.
-
Question
No description given
-
Question
No description given
-
Question
This shows how to implement a recursive function in JavaScript with a nested function definition.