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="x y"
4
computed="ans"
5
 
4135 bpr 6
:A numerical exercise with two random parameters.
23 reyssat 7
 
8
The numeric reply is computed with respect to random values of two 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
 
4135 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{Two parameters}
5147 bpr 20
:\author{XIAO, Gang}
8002 bpr 21
:\email{qualite@wimsedu.info}
5724 bpr 22
:\credits{}
23 reyssat 23
 
24
:First parameter \x.
25
\real{x=randint(5..20)*20}
26
 
27
:Second parameter \y.
28
\real{y=randitem(20,25,30,35,40,60)}
29
 
4135 bpr 30
:The computed right answer.
23 reyssat 31
All common functions are recognized. We use \x and \y to
32
designate the random parameters defined above.
33
\real{ans=\x*(100-\y)/100}
34
 
35
:Text that explains what should be done.
36
$embraced_randitem
37
\text{explain=
4135 bpr 38
A fashion article in a clothes shop costs \x dollars. During a
39
sales period, the shop offers a reduction of \y percent on the article.
40
What is the reduced price (in dollars)?
23 reyssat 41
}
11544 obado 42
 
43
:Embraced random items
8512 bpr 44
$embraced_randitem
11544 obado 45
\text{accolade=item(1,1 yes,
46
2 no)}
23 reyssat 47
 
11544 obado 48
:%% Do not modify
8512 bpr 49
\text{accolade=wims(word 1 of \accolade)}
50
\text{explain=\accolade=1 ?wims(embraced randitem \explain)}
23 reyssat 51
 
52
:%%%%%%%%%%%%% Now the statement in html. %%%%%%%%%%%%%%%%%%%%
53
 
54
::You don't need to modify this in general.
55
 
11544 obado 56
\statement{\explain}
23 reyssat 57
 
58
:%%%%%%%%%%%%% Nothing to modify after. %%%%%%%%%%%%%%%%%5
59
 
60
\answer{My reply}{\ans}{type=number}