QuizComposer
©2006 Olaf Kayser & Gunnar Mohr
Main site:
www.quizcomposer.dk
Examples of specification of number answers.
This example illustrates specification of correct answers in the form of numbers.
Question number
1
.
The correct answer to this question is the integer value 117. I may be specified directly as written but to emphasize that the answer should be a value rather than the number the correct answer is specified as 2*12 - 27. Consequently the answer can be an expression (in the programming language Python) with the same value, e.g. - - 117.
Question number
2
.
If you want a literal number answer such as the year number 117 the answer should be specified as a text, viz. ^117. The the only correct answer is 117 possibly with surrounding space characters. The correct answer to this question is specified as ^-117.
Question number
3
.
If a question is to be answered with a number value within an interval, for example of length 6 , symmetrical around a middle value, say -117, this can be specified as -117+-3. All values i
n the open interval
from -120 and -114 are then correct. The correct answer to this question is specified as -117+-3.
Question number
4
.
Suppose all numbers in a
closed interval
, for example of length 6 around a middle value, say 117, are to be specified as correct. This can be done with 117=+-=3.
Question number
5
.
An alternative way to specify the
closed interval
of length 6 around 117 is by using a relation, for example 114 <= @ <= 120. The character @ represents the answer. In this question the correct answer is specified as 120 > @ >= 114. Thus, the answer 120 - 5.5 would be correct.
Question number
6
.
Correct answers being all values
outside an interval
, say the semi-open interval from 114 to 120 (inclusive) can be specified with a logical expression as done here: @ <= 114 or @ > 120.
Question number
7
.
Specifying a correct answer as being a number
among a set
of integers, say 114, 120 and 144 can be done with the logical expression @ == 114 or @ == 120 or @ == 144.
Question number
8
.
A correct answer taking the form of an
ordered sequence
of numbers is specified using brackets as exemplified here: [117+-3][-120 < @ <= -114][ @==5 or @ == 6 ].
Question number
9
.
A
non-ordered sequence
of number answers is specified with braces as illustrated in this example: {117+-3}{-120 < @ <= -114}{ @==5 or @ == 6 }
Question number
10
.
A
sub-set from of a set
of possible answers is specified almost in the same way as an un-ordered set. Right after the leading brace character add a dot and the number of elements in the sub-set as exemplified here: {.2 117+-3}{-120 < @ <= -114}{ @==5 or @ == 6 }.
Answer one or more questions, then click this button:
Click browsers print option for a copy of this form including your answers.
Optional identification for print: