Skip to main content

Choice

rascal-0.40.13-BOOT2
rascal-tutor-0.19.9

Synopsis

Multiple-choice question.

Syntax

QChoice _OptName_: _MarkedText_ 
_GoodOrBad_₁: _Choice_₁
_GoodOrBad_₂: _Choice_₂
...

Description

Asks a multiple-choice questions described by MarkedText. OptName is an optional name of the question (enclosed between [ and ]). If OptName is missing, the question gets a unique number as name.

Each possible Choice is preceded by a good (g) or bad (b) marker. When generating a question 3 choices (including one good answer) are presented in random order.

Providing more good and bad answers will therefore create more variation in the generated questions.

Examples

QChoice[Faster]: Which means of transportation is faster:
b: Apache Helicopter
g: High-speed train
b: Ferrari F430
b: Hovercraft

will produce the question Faster in the questions section below.

And, by the way, the High-speed train wins with over 570 km/hour compared to Ferrari (315 km/hour), Apache (293 km/hour) and Hovercraft (137 km/hour).