Subversion Repositories wimsdev

Rev

Rev 8512 | Rev 11544 | 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.
10
<p>
8002 bpr 11
Author of the model: Gang Xiao <qualite@wimsedu.info>
23 reyssat 12
 
13
:%%%%%%%%%%%%%%%%%      ATTENTION      %%%%%%%%%%%%%%%%%%%%
14
 
4135 bpr 15
Remove the above header if you destroy the model tags i.e. the lines starting
16
with a ':'. Otherwise the exercise might not be recognised by Createxo.
23 reyssat 17
 
18
:%%%%%%%% Example parameters to be redefined %%%%%%%%%%%%%%%%%
19
 
20
:\title{Two parameters}
5147 bpr 21
:\author{XIAO, Gang}
8002 bpr 22
:\email{qualite@wimsedu.info}
5724 bpr 23
:\credits{}
23 reyssat 24
 
25
:First parameter \x.
26
\real{x=randint(5..20)*20}
27
 
28
:Second parameter \y.
29
\real{y=randitem(20,25,30,35,40,60)}
30
 
4135 bpr 31
:The computed right answer.
23 reyssat 32
All common functions are recognized. We use \x and \y to
33
designate the random parameters defined above.
34
\real{ans=\x*(100-\y)/100}
35
 
36
:Text that explains what should be done.
37
$embraced_randitem
38
\text{explain=
4135 bpr 39
A fashion article in a clothes shop costs \x dollars. During a
40
sales period, the shop offers a reduction of \y percent on the article.
41
What is the reduced price (in dollars)?
23 reyssat 42
}
8512 bpr 43
:Mise en aléatoire par des accolades emboitables
44
$embraced_randitem
45
\text{accolade=item(1,1 oui,
46
2 non)}
23 reyssat 47
 
8512 bpr 48
:%% Calculs à ne pas modifier
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
 
56
\statement{\explain
57
}
58
 
59
:%%%%%%%%%%%%% Nothing to modify after. %%%%%%%%%%%%%%%%%5
60
 
61
\answer{My reply}{\ans}{type=number}