Rev 8512 | Rev 11544 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
11375 | bpr | 1 | type=order |
4375 | bpr | 2 | textarea="data1 data2 data3 data4 data5" |
3 | |||
4 | :Mélange de lettres |
||
7718 | bpr | 5 | Faire un mot avec des lettres. Jusqu'à 5 listes de mots peuvent être entrées. |
4375 | bpr | 6 | Un mot au hasard dans chaque liste est pris à chaque fois. Une indication |
7 | peut être mise pour chaque mot. |
||
8 | <p> |
||
9 | <span class="wims_warning">$wims_name_warning</span>. Vous devez vérifier |
||
10 | que d'autres mots ne sont pas faisables avec les mêmes lettres |
||
11 | ou mettre une indication qui permette de différencier. |
||
12 | <p> |
||
13 | Auteur du modèle : Bernadette Perrin-Riou <bpr@math.u-psud.fr> |
||
14 | </p> |
||
15 | :%%%%%%%%%%%%%%%%% ATTENTION %%%%%%%%%%%%%%%%%%%% |
||
16 | |||
17 | Enlevez l'en-tête ci-dessus si vous détruisez les balises pour le modèle ! |
||
18 | (Ce sont les lignes qui commencent par un ':'.) |
||
19 | Sinon l'exercice risque de ne pas pouvoir repasser sous Createxo. |
||
20 | |||
21 | :%%%%%%%% Paramètres d'exemples à redéfinir %%%%%%%%%%%%%%%%% |
||
22 | |||
23 | :\title{Faire un mot avec des lettres } |
||
5147 | bpr | 24 | :\author{Bernadette, Perrin-Riou} |
4375 | bpr | 25 | :\email{bpr@math.u-psud.fr} |
5724 | bpr | 26 | :\credits{} |
4375 | bpr | 27 | |
28 | :Consigne |
||
29 | \text{instruction=Composer un mot avec toutes les lettres proposées.} |
||
30 | |||
31 | :Nombre de mots (au maximum 5) |
||
32 | Le nombre de mots doit être inférieur à 5 et inférieur au nombre de listes |
||
33 | remplies ci-dessous. |
||
34 | \integer{N=3} |
||
35 | |||
36 | :Première liste de mots |
||
5271 | bpr | 37 | Mettre un mot (ou groupe de mots) par ligne, suivi éventuellement d'une indication. S'il s'agit |
5907 | bpr | 38 | d'un groupe de mots, remplacer l'espace par <span class="tt">_</span>. |
4375 | bpr | 39 | \text{data1=bille, un jeu |
40 | domino,un jeu} |
||
41 | :Seconde liste de mots |
||
42 | \text{data2=enfant |
||
43 | mère |
||
44 | père} |
||
7718 | bpr | 45 | :Troisième liste de mots |
4375 | bpr | 46 | \text{data3=maison |
47 | immeuble |
||
48 | villa |
||
49 | habitation |
||
50 | } |
||
51 | :Quatrième liste de mots |
||
52 | \text{data4=} |
||
53 | :Cinquième liste de mots |
||
54 | \text{data5=} |
||
55 | |||
56 | :%%%%%%%%%%%%%% Rien à modifier avant l'énoncé %%%%%%%%%%%%%%%% |
||
57 | \matrix{data1=\data1} |
||
58 | \text{mot1=wims(nonempty items \data1[;1])} |
||
59 | \text{mot1=items(\mot1)>=2 ? shuffle(\mot1)} |
||
60 | \text{mot1=\mot1[1]} |
||
61 | \text{indication1=wims(select \data1 where column 1 issametext \mot1)} |
||
62 | \text{indication1=\indication1[2]} |
||
63 | \text{indication1=\indication1 issametext ? xxx} |
||
64 | \text{mot=\mot1} |
||
65 | \matrix{indication=\indication1} |
||
66 | \matrix{data2=\data2} |
||
67 | \text{mot2=wims(nonempty items \data2[;1])} |
||
68 | \text{mot2=items(\mot2)>=2 ? shuffle(\mot2)} |
||
69 | \text{mot2=\mot2[1]} |
||
4734 | bpr | 70 | \if{\mot2!=}{ |
4375 | bpr | 71 | \text{indication2=wims(select \data2 where column 1 issametext \mot2)} |
72 | \text{indication2=\indication2[2]} |
||
73 | \text{indication2=\indication2 issametext ? xxx} |
||
74 | \text{mot=wims(append item \mot2 to \mot)} |
||
75 | \matrix{indication=wims(append line \indication2 to \indication)} |
||
76 | } |
||
77 | \matrix{data3=\data3} |
||
78 | \text{mot3=wims(nonempty items \data3[;1])} |
||
79 | \text{mot3=items(\mot3)>=2 ? shuffle(\mot3)} |
||
80 | \text{mot3=\mot3[1]} |
||
4734 | bpr | 81 | \if{\mot3!=}{ |
4375 | bpr | 82 | \text{indication3=wims(select \data3 where column 1 issametext \mot3)} |
83 | \text{indication3=\indication3[2]} |
||
84 | \text{indication3=\indication3 issametext ? xxx} |
||
85 | \text{mot=wims(append item \mot3 to \mot)} |
||
86 | \matrix{indication=wims(append line \indication3 to \indication)} |
||
87 | } |
||
88 | |||
89 | \matrix{data4=\data4} |
||
90 | \text{mot4=wims(nonempty items \data4[;1])} |
||
91 | \text{mot4=items(\mot4)>=2 ? shuffle(\mot4)} |
||
92 | \text{mot4=\mot4[1]} |
||
93 | \if{\mot4!=}{ |
||
94 | \text{indication4=wims(select \data4 where column 1 issametext \mot4)} |
||
95 | \text{indication4=\indication4[2]} |
||
96 | \text{indication4=\indication4 issametext ? xxx} |
||
4734 | bpr | 97 | \text{mot=wims(append item \mot4 to \mot)} |
4375 | bpr | 98 | \matrix{indication=wims(append line \indication4 to \indication)} |
99 | } |
||
100 | |||
101 | \matrix{data5=\data5} |
||
102 | \text{mot5=wims(nonempty items \data5[;1])} |
||
103 | \text{mot5=items(\mot5)>=2 ? shuffle(\mot5)} |
||
104 | \text{mot5=\mot5[1]} |
||
105 | \if{\mot5!=}{ |
||
106 | \text{indication5=wims(select \data5 where column 1 issametext \mot5)} |
||
107 | \text{indication5=\indication5[2]} |
||
108 | \text{indication5=\indication5 issametext ? xxx} |
||
4734 | bpr | 109 | \text{mot=wims(append item \mot5 to \mot)} |
4375 | bpr | 110 | \matrix{indication=wims(append line \indication5 to \indication)} |
111 | } |
||
112 | |||
113 | \integer{N1=items(\mot)} |
||
114 | \text{bat=shuffle(\N1)} |
||
115 | \integer{N=min(\N1,\N)} |
||
116 | |||
117 | \text{mot=\mot[\bat]} |
||
118 | \matrix{indication=\indication[\bat;]} |
||
119 | \text{mot1=wims(text expand \mot[1] using 01)} |
||
120 | \text{mot1=wims(words2items \mot1)} |
||
5271 | bpr | 121 | \text{mot1=wims(replace internal _ by in \mot1)} |
4375 | bpr | 122 | |
123 | \text{mot2=wims(text expand \mot[2] using 01)} |
||
124 | \text{mot2=wims(words2items \mot2)} |
||
5271 | bpr | 125 | \text{mot2=wims(replace internal _ by in \mot2)} |
4375 | bpr | 126 | |
127 | \text{mot3=wims(text expand \mot[3] using 01)} |
||
128 | \text{mot3=wims(words2items \mot3)} |
||
5271 | bpr | 129 | \text{mot3=wims(replace internal _ by in \mot3)} |
4375 | bpr | 130 | |
131 | \text{mot4=wims(text expand \mot[4] using 01)} |
||
132 | \text{mot4=wims(words2items \mot4)} |
||
5271 | bpr | 133 | \text{mot4=wims(replace internal _ by in \mot4)} |
4375 | bpr | 134 | |
135 | \text{mot5=wims(text expand \mot[5] using 01)} |
||
136 | \text{mot5=wims(words2items \mot5)} |
||
5271 | bpr | 137 | \text{mot5=wims(replace internal _ by in \mot5)} |
4375 | bpr | 138 | \text{Mot=} |
139 | \text{STEP=wims(makelist r x for x=1 to \N)} |
||
140 | \text{STEP=r1} |
||
141 | \nextstep{\STEP} |
||
142 | |||
143 | \statement{ |
||
7718 | bpr | 144 | \for{a=1 to \step-1}{ |
4375 | bpr | 145 | \if{\a <= \N}{ |
146 | <div style="font-size:large;padding:6px; margin-left:10px;wdith:50%; |
||
7718 | bpr | 147 | border: 1px solid #555555;">\Mot[\a;] |
4375 | bpr | 148 | \if{ \indication[\a;] notsametext xxx }{ (\indication[\a;]) }</div> |
149 | } |
||
150 | } |
||
151 | \if{\step <= \N}{ |
||
152 | \instruction |
||
7718 | bpr | 153 | <div class="wimscenter">\embed{r \step,50 x 50} |
4375 | bpr | 154 | \if{ \indication[\step;] notsametext xxx }{ |
155 | (<span style="font-size:large;">\indication[\step;]</span>) } |
||
6132 | bpr | 156 | </div> |
4375 | bpr | 157 | } |
158 | } |
||
159 | \answer{}{\mot1}{type=dragfill}{option=nonstop} |
||
160 | \answer{}{\mot2}{type=dragfill}{option=nonstop} |
||
161 | \answer{}{\mot3}{type=dragfill}{option=nonstop} |
||
162 | \answer{}{\mot4}{type=dragfill}{option=nonstop} |
||
163 | \answer{}{\mot5}{type=dragfill}{option=nonstop} |
||
164 | |||
165 | \text{Mot=\reply1 |
||
166 | \reply2 |
||
167 | \reply3 |
||
168 | \reply4 |
||
169 | \reply5} |
||
170 | \text{Mot=wims(replace , by in \Mot)} |
||
171 | \matrix{Mot=\Mot} |
||
172 | \text{STEP=\step <= \N ? r \step:} |