Subversion Repositories wimsdev

Rev

Rev 14346 | Blame | Compare with Previous | Last modification | View Log | RSS feed

type=numbers gapfill
textarea="explain"
iEdit="explain"
random="x y"
computed="ans"
asis="explain"

:A numerical exercise with two random parameters.

The numeric reply is computed with respect to random values of two parameters,
according to various formulas.
<p>Author of the model: <a href="mailto:qualite@wimsedu.info">Gang Xiao</a></p>

:%%%%%%%%%%%%%%%%%      ATTENTION      %%%%%%%%%%%%%%%%%%%%

Remove the above header if you destroy the model tags i.e. the lines starting
with a ':'. Otherwise the exercise might not be recognised by Createxo.

:%%%%%%%% Example parameters to be redefined %%%%%%%%%%%%%%%%%

:\title{Two parameters}
:\author{XIAO, Gang}
:\email{qualite@wimsedu.info}
:\credits{}

:First parameter \x.
\real{x=randint(5..20)*20}

:Second parameter \y.
\real{y=randitem(20,25,30,35,40,60)}

:The computed right answer.
All common functions are recognized. We use \x and \y to
designate the random parameters defined above.
\real{ans=\x*(100-\y)/100}

:Text that explains what should be done.
$embraced_randitem
\text{explain=
A fashion article in a clothes shop costs \x dollars. During a
sales period, the shop offers a reduction of \y percent on the article.
What is the reduced price (in dollars)?
}

:Embraced random items
$embraced_randitem
\text{accolade=item(1,1 yes,
2 no)}

:%% Do not modify
\text{accolade=wims(word 1 of \accolade)}
\text{explain=\accolade=1 ?wims(embraced randitem \explain)}

:%%%%%%%%%%%%% Now the statement in html. %%%%%%%%%%%%%%%%%%%%

::You don't need to modify this in general.

\statement{\explain}

:%%%%%%%%%%%%% Nothing to modify after. %%%%%%%%%%%%%%%%%5

\answer{My reply}{\ans}{type=number}