Reply To: Exercices à étapes

Accueil Forums Programmation WIMS Programmation d’exercices OEF Exercices à étapes Reply To: Exercices à étapes

#1378
admin_r00t
Maître des clés
Up
0
Down
::

je me permets de solliciter à nouveau votre aide
car mon problème n’est pas encore résolu.
Lorsqu’il y ‘ a plusieurs énoncés en question 2, chaque énoncé dépendant du résultat de la question 1,
et que chaque énoncé comporte plusieurs réponses à donner, comment procéder ?
ci-dessous exemple 2 simplifié pour lequel l’affichage n’est pas satisfaisant.

 
\text{etape=r1}
\nextstep{\etape}
 

 
\integer{x=random(-8..8)}
 

 
\real{rep1= \x}
 
\real{rep2= \x+1}
 
\real{rep3= \x+2}
 
\real{rep4= \x+3}
 
\real{rep5= \x+4}
 
\real{rep6= \x+5}
 
\real{rep7= \x+6}
 
\real{rep8= \x+7}
 

 
\statement{On donne x = \x <br /><br />
 
\if{\step=1}{
 
x = \embed{reply1,10}<br />
 
}
 
\if{\step=2 and \etape=r2 or \step=2 and \etape=r3}{
 
x +1 = \embed{reply2,10}<br />
 
x+2= \embed{reply3,10}<br />
 
}
 
\if{\step=2 and \etape=r4 or \step=2 and \etape=r5 or \step=2 and \etape=r6}
 
{
 
x+3= \embed{reply4,10}<br />
 
x+4= \embed{reply5,10}<br />
 
x+5= \embed{reply6,10}<br />
 
}
 

 
\if{\step=2 and r7 isitemof \etape}{
 
x+6= \embed{reply7,10}<br />
 
x+7= \embed{reply8,10}
 
}
 
}
 
\answer{}{\rep1}{type=algexp}
 
\answer{}{\rep2}{type=algexp}
 
\answer{}{\rep3}{type=algexp}
 
\answer{}{\rep4}{type=algexp}
 
\answer{}{\rep5}{type=algexp}
 
\answer{}{\rep6}{type=algexp}
 
\answer{}{\rep7}{type=algexp}
 
\answer{}{\rep8}{type=algexp}
 

 
\text{etape=}
 
\if{ \step = 2 and \rep1<0}{
 
\text{ etape= r2,r3}}
 

 
\if{ \step = 2 and \rep1>0}{
 
\text{ etape= r4,r5,r6}
 
}
 

 
\if{ \step = 2 and \rep1=0}{
 
\text{ etape= r7,r8}
 
}