Accueil › Forums › Programmation WIMS › Programmation d’exercices OEF › Exercice avec un nombre aleatoire de réponses › Répondre à : Exercice avec un nombre aleatoire de réponses
19 avril 2021 à 19:35
#6346
Participant
::
Bonjour,
Voici un code possible pour l’exercice test :
\title{test}
\real{a=1}
\real{b=2}
\real{c=3}
\integer{n=random(0,1)}
\text{listrep=\n=0?reply1:reply2,reply3}
\steps{\listrep}
\statement{
\if{\n=0}{ a=\embed{reply1,4}}
{ b=\embed{reply2,4}, c=\embed{reply3,4} }
}
\answer{}{\a}{type=numeric}
\answer{}{\b}{type=numeric}
\answer{}{\c}{type=numeric}