Skip to content

DRAFT: Syntax for randomised problems

PerpetualCreativity edited this page Oct 12, 2020 · 11 revisions

Example of a randomised problem:

Suppose you are in a car with a velocity of &a=(30, 100, 3)& kilometres per hour. How far will you travel in &b=(1, 3, 2)& hours?
Answer: &&[a*b, 2]&&

This syntax defines a variable a, with a value between 30 and 100, and with 3 significant figures. It also defines a value b, with a value between 1 and 3, and with 2 significant figures. The answer is defined as a*b, with 2 sig figs. Spaces are not optional.

Variable names must be single-character, lowercase English characters. ([a-z])

The output might be:

Suppose you are in a car with a velocity of 45.2 kilometres per hour. How far will you travel in 1.3 hours?

Answer: 59 km/h

Operations allowed in evaluation blocks (delimited by &&): ()^*/+-, sin, cos, and tan.

Usage of trig functions: Answer: &&sin(a, r)&& where r denotes radian mode and d denotes degree mode.

(The above is not an example of a good question on Mutorials.)

Clone this wiki locally