Subversion Repositories wimsdev

Rev

Rev 11375 | Rev 13704 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
11375 bpr 1
type=gapfill first
23 reyssat 2
textarea="explain"
3
random="a b c d"
4
computed="ans"
5
 
4131 bpr 6
:A numerical exercise with 4 random parameters.
23 reyssat 7
 
8
The numeric reply is computed with respect to random values of 4 parameters,
9
according to various formulas.
11544 obado 10
<p>Author of the model: Gang Xiao <qualite@wimsedu.info></p>
23 reyssat 11
 
12
:%%%%%%%%%%%%%%%%%      ATTENTION      %%%%%%%%%%%%%%%%%%%%
13
 
4131 bpr 14
Remove the above header if you destroy the model tags i.e.the lines starting
15
with a ':'. Otherwise the exercise might not be recognised by Createxo.
23 reyssat 16
 
17
:%%%%%%%% Example parameters to be redefined %%%%%%%%%%%%%%%%%
18
 
19
:\title{Four parameters}
5147 bpr 20
:\author{XIAO, Gang}
8002 bpr 21
:\email{qualite@wimsedu.info}
5724 bpr 22
:\credits{}
23 reyssat 23
 
24
:First parameter \a.
25
\real{a=randint(-20..20)}
26
 
27
:Second parameter \b.
28
\real{b=randint(-20..20)}
29
 
30
:Third parameter \c.
31
\real{c=randint(-20..20)}
32
 
33
:Fourth parameter \d.
34
\real{d=randint(-20..20)}
35
 
4131 bpr 36
:The computed correct answer.
23 reyssat 37
All common functions are recognized. We use \a, \b, \c, \d to
38
designate the random parameters defined above.
39
\real{ans=(\a)*(\d) - (\b)*(\c)}
40
 
41
:Text that explains what should be done.
42
Note that the syntax \(...) shows a mathematical formula as it should be.
43
$embraced_randitem
44
\text{explain=
45
Compute the determinant of the matrix \([\a,\b;\c,\d]).
46
}
47
 
11544 obado 48
:Embraced random items
8512 bpr 49
$embraced_randitem
11544 obado 50
\text{accolade=item(1,1 yes,
51
2 no)}
23 reyssat 52
 
11544 obado 53
:%% Do not modify
8512 bpr 54
\text{accolade=wims(word 1 of \accolade)}
55
\text{explain=\accolade=1 ?wims(embraced randitem \explain)}
56
 
23 reyssat 57
:%%%%%%%%%%%%% Now the statement in html. %%%%%%%%%%%%%%%%%%%%
58
 
59
::You don't need to modify this in general.
60
 
61
\statement{\explain
62
}
63
 
64
:%%%%%%%%%%%%% Nothing to modify after. %%%%%%%%%%%%%%%%%5
65
 
66
\answer{My reply}{\ans}{type=number}
67