Accueil › Forums › Programmation WIMS › Programmation dans le langage wims › exercice à étapes avec nextstep › Répondre à : exercice à étapes avec nextstep
2 septembre 2015 à 08:48
#3067
Participant
::
Merci pour votre réponse, j’avais en effet mal compris la variable \step. Du coup, juste au cas où ça intéresse d’autres personnes, voici le code qui fait ce que je voulais :
\text{etap=r1}
\nextstep{\etap}
\integer{ok1=0}
\integer{ok2=0}
\statement{Entrer le texte demandé :
\if{\ok1 == 0}{Tapez "toto" : \embed{r1}}
\if{\ok1 == 1 and \ok2 == 0 }{Vous avez tapé \reponse1. Tapez "tata" : \embed{r2}}
}
\answer{}{\reponse1}{type=nocase}
\answer{}{\reponse2}{type=nocase}
\condition{Vous avez tapé \reponse1}{\reponse1 issametext toto}
\condition{Vous avez tapé \reponse2}{\reponse2 issametext tata}
\if{\ok1 == 1 and \ok2 == 0 and \reponse2 issametext tata}
{\text{etap =}}
{\text{etap = r2}}
\if{\ok1 == 0}
{
\if{\reponse1 issametext toto}
{
\text{etap = r2}
\integer{ok1=1}
}
{\text{etap = r1}}
}