From ac4def8dad0fb72369b20fe8c391a9a861a6f8f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20M=2E=20Thi=C3=A9ry?= <nthiery@users.sf.net> Date: Wed, 24 Sep 2014 22:51:45 +0200 Subject: [PATCH] Mise a jours fichiers WIMS automatiques --- U2~coding~oefprogramC.fr/Exauthors | 5 + U2~coding~oefprogramC.fr/Exindex | 4 +- U2~coding~oefprogramC.fr/Extitles | 2 +- U2~coding~oefprogramC.fr/INDEX | 9 +- U2~coding~oefprogramC.fr/def/etat_civil.def | 121 ++++++++++---------- 5 files changed, 75 insertions(+), 66 deletions(-) create mode 100644 U2~coding~oefprogramC.fr/Exauthors diff --git a/U2~coding~oefprogramC.fr/Exauthors b/U2~coding~oefprogramC.fr/Exauthors new file mode 100644 index 0000000..9014600 --- /dev/null +++ b/U2~coding~oefprogramC.fr/Exauthors @@ -0,0 +1,5 @@ +boucle:Mathieu Clément-Ziza +etat_civil:Mathieu Clément-Ziza +tab1d:Mathieu Clément-Ziza +tab2d:Mathieu Clément-Ziza +test_cond:Mathieu Clément-Ziza diff --git a/U2~coding~oefprogramC.fr/Exindex b/U2~coding~oefprogramC.fr/Exindex index b387e8e..8437d2e 100644 --- a/U2~coding~oefprogramC.fr/Exindex +++ b/U2~coding~oefprogramC.fr/Exindex @@ -1,4 +1,4 @@ -!set exolist =!char 1 to -2 of boucle,etat_civil,tab1d,tab2d,test_cond, -!set titlelist=!char 1 to -2 of Boucle,Etat civil,Tableau 1D,Tableau 2D,Tests, +!set exolist =!char 1 to -2 of boucle,tab1d,tab2d,test_cond,etat_civil, +!set titlelist=!char 1 to -2 of Boucle,Tableau 1D,Tableau 2D,Tests,État civil, !set exototal =!itemcnt $exolist diff --git a/U2~coding~oefprogramC.fr/Extitles b/U2~coding~oefprogramC.fr/Extitles index 3e347f3..640fdf8 100644 --- a/U2~coding~oefprogramC.fr/Extitles +++ b/U2~coding~oefprogramC.fr/Extitles @@ -1,5 +1,5 @@ boucle:Boucle -etat_civil:Etat civil +etat_civil:État civil tab1d:Tableau 1D tab2d:Tableau 2D test_cond:Tests diff --git a/U2~coding~oefprogramC.fr/INDEX b/U2~coding~oefprogramC.fr/INDEX index 31d0f18..d028184 100644 --- a/U2~coding~oefprogramC.fr/INDEX +++ b/U2~coding~oefprogramC.fr/INDEX @@ -1,4 +1,4 @@ -# This file is automatically generated by Modtool 4.00. +# This file is automatically generated by Modtool 4.05. # Do not edit by hand. title=OEF Petits tests de programmation @@ -7,11 +7,11 @@ language=fr category=exercise, oef domain=informatics level=U1,U2 -keywords=C, programme,boucle,tableau,biology,biologie,program +keywords=C,C++,programme,boucle,tableau,biology,biologie,program require=pari scoring=yes -copyright=© 2008 (<a href="COPYING">GNU GPL</a>) 2010 2011 -author=Mathieu Clément-Ziza +copyright=© 2008 (<a href="COPYING">GNU GPL</a>) 2010 2011 2014 +author=Mathieu, Clément-Ziza address=clementm@necker.fr version=1.02 wims_version=4.01f @@ -22,4 +22,3 @@ data= maintainer=Bernadette Perrin-Riou maintainer_address=bpr@math.u-psud.fr translation_language= - diff --git a/U2~coding~oefprogramC.fr/def/etat_civil.def b/U2~coding~oefprogramC.fr/def/etat_civil.def index 550c263..0b9e8bd 100644 --- a/U2~coding~oefprogramC.fr/def/etat_civil.def +++ b/U2~coding~oefprogramC.fr/def/etat_civil.def @@ -1,4 +1,4 @@ -!set title=Etat civil +!set title=État civil !if $wims_read_parm!=$empty !goto $wims_read_parm !endif @@ -8,8 +8,8 @@ author=Mathieu Cl email=clementm@necker.fr ansorder=r -varcnt=36 -prevarcnt=35 +varcnt=38 +prevarcnt=37 postvarcnt=0 replycnt=1 choicecnt=0 @@ -37,13 +37,13 @@ tmp0=!randitem $tmp val7=$(tmp0) !ifval $val7 issametext celibataire -val8=Mademoiselle +val8= Mademoiselle !else val8= Madame !endif !ifval $val7 issametext celibataire -val9=Madame +val9= Madame !else val9= Mademoiselle !endif @@ -65,89 +65,94 @@ tmp=!nonempty items Trucmuche,Trucmachin tmp0=!randitem $tmp val13=$(tmp0) -val14=<pre style="background-color:#F0FFFF; color:red;"> #include<stdio.h> #include<string.h> int main(void) { char reponse1[4]; char reponse2[4]; char etat[14]; char nom[30]; printf("Etes vous de sexe masculin ? "); scanf("%s",reponse1); if (strcmp(reponse1,"oui") == 0 || strcmp(reponse1,"$val10") == 0) strcpy(etat,"Monsieur"); else { printf("Etes-vous $val7 ? "); scanf("%s",reponse2); if (strcmp(reponse2,"oui")==0 || strcmp(reponse2,"$val12")==0) strcpy(etat,"$val8"); else strcpy(etat,"$val9"); } printf("Bonjour %s\n",etat); printf("Quel est votre nom ? "); scanf("%s",nom); printf("Au revoir %s ",etat); puts(nom); return 0; } </pre> -val15=<pre style="background-color:#F0FFFF; color:red"> <b>DEBUT DE PROGRAMME</b> Afficher ("etes vous de sexe masculin") <b>SI</b> reponse est "oui" OU "$val10" Copier la chaîne "Monsieur" dans etat <b>SINON</b> Afficher ("Etes-vous $val7 ? ") <b>SI</b> reponse est "oui" OU "$val12" Copier la chaîne "$val8" dans etat <b>SINON </b> Copier la chaîne "$val9" dans etat <b>Fin SINON</b> Afficher ("Bonjour [etat]") Afficher ("Quel est votre nom ?") Afficher ("Au revoir [etat] [nom]") <b>FIN DE PROGRAMME</b> </pre> +val14=<pre style="background-color:#F0FFFF; color:red;"> #include<stdio.h> #include<string.h> int main(void) { char reponse1[4]; char reponse2[4]; char etat[14]; char nom[30]; printf("Êtes vous de sexe masculin ? "); scanf("%s",reponse1); if (strcmp(reponse1,"oui") == 0 || strcmp(reponse1,"$val10") == 0) strcpy(etat,"Monsieur"); else { printf("Êtes-vous $val7 ? "); scanf("%s",reponse2); if (strcmp(reponse2,"oui")==0 || strcmp(reponse2,"$val12")==0) strcpy(etat,"$val8"); else strcpy(etat,"$val9"); } printf("Bonjour %s\n",etat); printf("Quel est votre nom ? "); scanf("%s",nom); printf("Au revoir %s ",etat); puts(nom); return 0; } </pre> +val15=<pre style="background-color:#F0FFFF; color:red;"> #include<iostream> #include<string> using namespace std; int main(void) { string reponse1; string reponse2; string etat; string nom; cout << "Êtes vous de sexe masculin ? "; cin >> reponse1; if (reponse1 == "oui" or reponse1 == "$val10") { etat = "Monsieur"; } else { cout << "Êtes-vous $val7 ? "; cin >> reponse2; if ( reponse2 == "oui" or reponse2 == "$val12") etat = "$val8"; else etat = "$val9"; } cout << "Bonjour: " << etat << endl; cout << "Quel est votre nom ? "; cin >> nom; cout << "Au revoir " << etat << " " nom << endl; return 0; } </pre> +val16=<pre style="background-color:#F0FFFF; color:red"> <b>DEBUT DE PROGRAMME</b> Afficher ("Êtes vous de sexe masculin") <b>SI</b> reponse est "oui" OU "$val10" Copier la chaîne "Monsieur" dans etat <b>SINON</b> Afficher ("Êtes-vous $val7 ? ") <b>SI</b> réponse est "oui" OU "$val12" Copier la chaîne "$val8" dans etat <b>SINON </b> Copier la chaîne "$val9" dans etat <b>Fin SINON</b> Afficher ("Bonjour [etat]") Afficher ("Quel est votre nom ?") Afficher ("Au revoir [etat] [nom]") <b>FIN DE PROGRAMME</b> </pre> tmp=!trim non,non,$val13 non,NON,$val13 non,oui,$val13 non,Oui,$val13 non,OUI,$val13 NON,non,$val13 NON,NON,$val13 NON,oui,$val13 NON,Oui,$val13 NON,OUI,$val13 $val10,$val13,0 oui,$val13,0 $val11,non,$val13 $val11,NON,$val13 $val11,oui,$val13 $val11,Oui,$val13 $val11,OUI,$val13 -val16=!translate internal $ \ +val17=!translate internal $ \ $ to ;; in $tmp -tmp=!translate internal $ $ to ; in $val16 +tmp=!translate internal $ $ to ; in $val17 tmp0=!rowcnt $tmp tmp1=!shuffle $(tmp0) -val17=$(tmp1) -tmp=!trim $(val16[$(val17[1]);]) -val18=!translate internal $ \ +val18=$(tmp1) +tmp=!trim $(val17[$(val18[1]);]) +val19=!translate internal $ \ $ to ;; in $tmp -tmp0=!exec bioinfo $val6 $val10 $val12 $val8 $val9 $val7 $(val18[1;1]) $(val18[1;2]) $(val18[1;3]) +tmp0=!exec bioinfo $val6 $val10 $val12 $val8 $val9 $val7 $(val19[1;1]) $(val19[1;2]) $(val19[1;3]) tmp=!trim $(tmp0) -val19=!translate internal $ \ +val20=!translate internal $ \ $ to ;; in $tmp -val20=0 -val21=2 -!while $val20 < 1 -tmp=!trim $(val16[$(val17[$val21]);]) -val22=!translate internal $ \ +val21=0 +val22=2 +!while $val21 < 1 +tmp=!trim $(val17[$(val18[$val22]);]) +val23=!translate internal $ \ $ to ;; in $tmp -tmp0=!exec bioinfo $val6 $val10 $val12 $val8 $val9 $val7 $(val22[1;1]) $(val22[1;2]) $(val22[1;3]) +tmp0=!exec bioinfo $val6 $val10 $val12 $val8 $val9 $val7 $(val23[1;1]) $(val23[1;2]) $(val23[1;3]) -val23=$(tmp0) -!if $val23 notsametext $(val19[1;]) -val20=$[rint($val20+1)] -tmp=!trim $(val19[1;]);$val23 -val19=!translate internal $ \ +val24=$(tmp0) +!if $val24 notsametext $(val20[1;]) +val21=$[rint($val21+1)] +tmp=!trim $(val20[1;]);$val24 +val20=!translate internal $ \ $ to ;; in $tmp -tmp=!trim $(val18[1;]);$(val22[1;]) -val18=!translate internal $ \ +tmp=!trim $(val19[1;]);$(val23[1;]) +val19=!translate internal $ \ $ to ;; in $tmp !endif -val21=$[rint($val21+1)] +val22=$[rint($val22+1)] !endwhile -val20=0 -!while $val20 < 1 -tmp=!trim $(val16[$(val17[$val21]);]) -val22=!translate internal $ \ +val21=0 +!while $val21 < 1 +tmp=!trim $(val17[$(val18[$val22]);]) +val23=!translate internal $ \ $ to ;; in $tmp -tmp0=!exec bioinfo $val6 $val10 $val12 $val8 $val9 $val7 $(val22[1;1]) $(val22[1;2]) $(val22[1;3]) +tmp0=!exec bioinfo $val6 $val10 $val12 $val8 $val9 $val7 $(val23[1;1]) $(val23[1;2]) $(val23[1;3]) -val23=$(tmp0) -!if $val23 notsametext $(val19[1;]) and $val23 <> $(val19[2;]) -val20=$[rint($val20+1)] -tmp=!trim $(val19[1;]);$(val19[2;]);$val23 -val19=!translate internal $ \ +val24=$(tmp0) +!if $val24 notsametext $(val20[1;]) and $val24 <> $(val20[2;]) +val21=$[rint($val21+1)] +tmp=!trim $(val20[1;]);$(val20[2;]);$val24 +val20=!translate internal $ \ $ to ;; in $tmp -tmp=!trim $(val18[1;]);$(val18[2;]);$(val22[1;]) -val18=!translate internal $ \ +tmp=!trim $(val19[1;]);$(val19[2;]);$(val23[1;]) +val19=!translate internal $ \ $ to ;; in $tmp !endif -val21=$[rint($val21+1)] +val22=$[rint($val22+1)] !endwhile tmp0=!randint 1, 3 -val24=$[rint($(tmp0))] -val25=<b>$(val18[$val24;1])</b> -val25=$val25 puis <b>$(val18[$val24;2])</b> +val25=$[rint($(tmp0))] +val26=<b>$(val19[$val25;1])</b> +val26=$val26 puis <b>$(val19[$val25;2])</b> -!ifval $(val18[$val24;3])!=0 -val25= $val25 et enfin <b>$(val18[$val24;3])</b> +!ifval $(val19[$val25;3])!=0 +val26= $val26 et enfin <b>$(val19[$val25;3])</b> !endif !ifval $val3 issametext algo -val26=$val15 +val27=$val16 !else -tmp=!nonempty items $val15,$val14 +tmp=!nonempty items $val16,$val14 tmp0=!randitem $tmp -val26=$(tmp0) +val27=$(tmp0) !endif !ifval $val3 issametext code -val26=$val14 +val27=$val14 +!endif + +!ifval $val3 issametext code_cpp +val27=$val15 !endif replytype1=click replyname1= -replygood1=$val24;A,B,C +replygood1=$val25;A,B,C question=__EXECUTED_1692754_EXERCISE__ !goto stat @@ -155,15 +160,15 @@ question=__EXECUTED_1692754_EXERCISE__ !exit :question -$() <!-- Enoncé--> <p>Lors de l'exécution de ce programme, par saisie clavier, l'utitlisateur a répondu successivement $val25. Quels seront les affichages à l'écran? <!-- Tableau : à gauche le code C, à droite le QCM --> </p> <table border="0" align="center"> <tr> <td> <!-- Affichage du Code C --> -!read oef/special.phtml expandlines $val26 -$() </td> <!-- Mis en forme html du QCM --> <td> <table align="center" border="1"> <tr> <td> +$() <!-- Enoncé--> <p>Lors de l'exécution de ce programme, par saisie clavier, l'utilisateur a répondu successivement $val26. Quels seront les affichages à l'écran? <!-- Tableau : à gauche le code C, à droite le QCM --> </p> <table border="0" align="center"> <tr> <td> <!-- Affichage du Code C --> +!read oef/special.phtml expandlines $val27 +$() </td> <!-- Mis en forme html du QCM --> <td> <table align="center" border="1"> <tr> <td> !read oef/embed.phtml reply1,1 -$() </td> <td> <pre>$(val19[1;])</pre> </td> </tr> <tr> <td> +$() </td> <td> <pre>$(val20[1;])</pre> </td> </tr> <tr> <td> !read oef/embed.phtml reply1,2 -$() </td> <td> <pre>$(val19[2;])</pre> </td> </tr> <tr> <td> +$() </td> <td> <pre>$(val20[2;])</pre> </td> </tr> <tr> <td> !read oef/embed.phtml reply1,3 -$() </td> <td> <pre>$(val19[3;])</pre> </td> </tr> </table> </td> </tr> </table> +$() </td> <td> <pre>$(val20[3;])</pre> </td> </tr> </table> </td> </tr> </table> $() !exit @@ -196,5 +201,5 @@ $() !exit :stat -vsavelist=19,25,26 +vsavelist=20,26,27 embedcnt=4 -- GitLab