Rev 13476 | Rev 13716 | 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 |
12170 | mquerol | 2 | textarea="instruction data1 data2 data3 data4 data5" |
4375 | bpr | 3 | |
12170 | mquerol | 4 | :Fer una paraula amb les lletres |
5 | Es poden introduir fins a 5 llistes de paraules. |
||
6 | Cada vegada es pren una paraula aleatòria de cada llista. Una indicació |
||
7 | es pot posar per a cada paraula. |
||
4375 | bpr | 8 | <p> |
12170 | mquerol | 9 | <span class="wims_warning">$wims_name_warning</span>. Heu de verificar |
10 | que altres paraules no són factibles amb les mateixes lletres |
||
13476 | obado | 11 | o posar una indicació que permeti diferenciar.</p> |
12 | <p class="wims_credits"> |
||
12170 | mquerol | 13 | Autor del model: Bernadette Perrin-Riou <bpr@math.u-psud.fr> |
4375 | bpr | 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 | |||
12170 | mquerol | 23 | :\title{Barreja de lletres} |
5147 | bpr | 24 | :\author{Bernadette, Perrin-Riou} |
4375 | bpr | 25 | :\email{bpr@math.u-psud.fr} |
12170 | mquerol | 26 | :\credits{} |
4375 | bpr | 27 | |
12170 | mquerol | 28 | :Enunciat |
4375 | bpr | 29 | \text{instruction=Composer un mot avec toutes les lettres proposées.} |
30 | |||
12170 | mquerol | 31 | :Nombre de paraules (màxim 5) |
32 | El nombre de paraules ha de ser inferior a 5 i inferior al nombre de llistes |
||
33 | completat a continuació. |
||
4375 | bpr | 34 | \integer{N=3} |
35 | |||
12170 | mquerol | 36 | :Primera llista de paraules |
37 | Introduïu una paraula (o grup de paraules) per línia, possiblement seguit d'una indicació. Si ho és |
||
38 | d'un grup de paraules, reemplaça l'espai amb <span class="tt">_</span>. |
||
4375 | bpr | 39 | \text{data1=bille, un jeu |
12170 | mquerol | 40 | domino,un jeu |
41 | jeu_de_dames,un jeu} |
||
13476 | obado | 42 | |
12170 | mquerol | 43 | :Segona llista de paraules |
4375 | bpr | 44 | \text{data2=enfant |
45 | mère |
||
46 | père} |
||
13476 | obado | 47 | |
12170 | mquerol | 48 | :Tercera llista de paraules |
4375 | bpr | 49 | \text{data3=maison |
50 | immeuble |
||
51 | villa |
||
52 | habitation |
||
53 | } |
||
13476 | obado | 54 | |
12170 | mquerol | 55 | :Quarta llista de paraules |
4375 | bpr | 56 | \text{data4=} |
13476 | obado | 57 | |
12170 | mquerol | 58 | :Cinquena llista de paraules |
4375 | bpr | 59 | \text{data5=} |
60 | |||
61 | :%%%%%%%%%%%%%% Rien à modifier avant l'énoncé %%%%%%%%%%%%%%%% |
||
13481 | obado | 62 | \css{<style type="text/css"> |
63 | .word_jumble{ |
||
64 | font-size:large; |
||
65 | padding:6px; |
||
66 | margin-left:10px; |
||
67 | border: 1px solid #555; |
||
68 | }</style>} |
||
69 | |||
4375 | bpr | 70 | \matrix{data1=\data1} |
71 | \text{mot1=wims(nonempty items \data1[;1])} |
||
72 | \text{mot1=items(\mot1)>=2 ? shuffle(\mot1)} |
||
73 | \text{mot1=\mot1[1]} |
||
74 | \text{indication1=wims(select \data1 where column 1 issametext \mot1)} |
||
75 | \text{indication1=\indication1[2]} |
||
76 | \text{indication1=\indication1 issametext ? xxx} |
||
77 | \text{mot=\mot1} |
||
78 | \matrix{indication=\indication1} |
||
79 | \matrix{data2=\data2} |
||
80 | \text{mot2=wims(nonempty items \data2[;1])} |
||
81 | \text{mot2=items(\mot2)>=2 ? shuffle(\mot2)} |
||
82 | \text{mot2=\mot2[1]} |
||
4734 | bpr | 83 | \if{\mot2!=}{ |
4375 | bpr | 84 | \text{indication2=wims(select \data2 where column 1 issametext \mot2)} |
85 | \text{indication2=\indication2[2]} |
||
86 | \text{indication2=\indication2 issametext ? xxx} |
||
87 | \text{mot=wims(append item \mot2 to \mot)} |
||
88 | \matrix{indication=wims(append line \indication2 to \indication)} |
||
89 | } |
||
90 | \matrix{data3=\data3} |
||
91 | \text{mot3=wims(nonempty items \data3[;1])} |
||
92 | \text{mot3=items(\mot3)>=2 ? shuffle(\mot3)} |
||
93 | \text{mot3=\mot3[1]} |
||
4734 | bpr | 94 | \if{\mot3!=}{ |
4375 | bpr | 95 | \text{indication3=wims(select \data3 where column 1 issametext \mot3)} |
96 | \text{indication3=\indication3[2]} |
||
97 | \text{indication3=\indication3 issametext ? xxx} |
||
98 | \text{mot=wims(append item \mot3 to \mot)} |
||
99 | \matrix{indication=wims(append line \indication3 to \indication)} |
||
100 | } |
||
101 | |||
102 | \matrix{data4=\data4} |
||
103 | \text{mot4=wims(nonempty items \data4[;1])} |
||
104 | \text{mot4=items(\mot4)>=2 ? shuffle(\mot4)} |
||
105 | \text{mot4=\mot4[1]} |
||
106 | \if{\mot4!=}{ |
||
107 | \text{indication4=wims(select \data4 where column 1 issametext \mot4)} |
||
108 | \text{indication4=\indication4[2]} |
||
109 | \text{indication4=\indication4 issametext ? xxx} |
||
4734 | bpr | 110 | \text{mot=wims(append item \mot4 to \mot)} |
4375 | bpr | 111 | \matrix{indication=wims(append line \indication4 to \indication)} |
112 | } |
||
113 | |||
114 | \matrix{data5=\data5} |
||
115 | \text{mot5=wims(nonempty items \data5[;1])} |
||
116 | \text{mot5=items(\mot5)>=2 ? shuffle(\mot5)} |
||
117 | \text{mot5=\mot5[1]} |
||
118 | \if{\mot5!=}{ |
||
119 | \text{indication5=wims(select \data5 where column 1 issametext \mot5)} |
||
120 | \text{indication5=\indication5[2]} |
||
121 | \text{indication5=\indication5 issametext ? xxx} |
||
4734 | bpr | 122 | \text{mot=wims(append item \mot5 to \mot)} |
4375 | bpr | 123 | \matrix{indication=wims(append line \indication5 to \indication)} |
124 | } |
||
125 | |||
126 | \integer{N1=items(\mot)} |
||
127 | \text{bat=shuffle(\N1)} |
||
128 | \integer{N=min(\N1,\N)} |
||
129 | |||
130 | \text{mot=\mot[\bat]} |
||
131 | \matrix{indication=\indication[\bat;]} |
||
132 | \text{mot1=wims(text expand \mot[1] using 01)} |
||
133 | \text{mot1=wims(words2items \mot1)} |
||
5271 | bpr | 134 | \text{mot1=wims(replace internal _ by in \mot1)} |
4375 | bpr | 135 | |
136 | \text{mot2=wims(text expand \mot[2] using 01)} |
||
137 | \text{mot2=wims(words2items \mot2)} |
||
5271 | bpr | 138 | \text{mot2=wims(replace internal _ by in \mot2)} |
4375 | bpr | 139 | |
140 | \text{mot3=wims(text expand \mot[3] using 01)} |
||
141 | \text{mot3=wims(words2items \mot3)} |
||
5271 | bpr | 142 | \text{mot3=wims(replace internal _ by in \mot3)} |
4375 | bpr | 143 | |
144 | \text{mot4=wims(text expand \mot[4] using 01)} |
||
145 | \text{mot4=wims(words2items \mot4)} |
||
5271 | bpr | 146 | \text{mot4=wims(replace internal _ by in \mot4)} |
4375 | bpr | 147 | |
148 | \text{mot5=wims(text expand \mot[5] using 01)} |
||
149 | \text{mot5=wims(words2items \mot5)} |
||
5271 | bpr | 150 | \text{mot5=wims(replace internal _ by in \mot5)} |
4375 | bpr | 151 | \text{Mot=} |
152 | \text{STEP=wims(makelist r x for x=1 to \N)} |
||
153 | \text{STEP=r1} |
||
154 | \nextstep{\STEP} |
||
155 | |||
156 | \statement{ |
||
13481 | obado | 157 | <div class="spacer"> |
158 | \for{a=1 to \step-1}{ |
||
159 | \if{\a <= \N}{ |
||
160 | <span class="word_jumble"> |
||
161 | \Mot[\a;] |
||
162 | \if{ \indication[\a;] notsametext xxx }{ <em class="indication">(\indication[\a;])</em>} |
||
163 | </span> |
||
164 | } |
||
4375 | bpr | 165 | } |
13481 | obado | 166 | </div> |
167 | \if{\step <= \N}{ |
||
168 | <p class="instruction">\instruction</p> |
||
169 | <div class="wimscenter"> |
||
170 | \embed{r \step,50 x 50} |
||
171 | \if{ \indication[\step;] notsametext xxx }{ |
||
172 | (<span class="indication">\indication[\step;]</span>) |
||
173 | } |
||
174 | </div> |
||
175 | } |
||
4375 | bpr | 176 | } |
13481 | obado | 177 | |
4375 | bpr | 178 | \answer{}{\mot1}{type=dragfill}{option=nonstop} |
179 | \answer{}{\mot2}{type=dragfill}{option=nonstop} |
||
180 | \answer{}{\mot3}{type=dragfill}{option=nonstop} |
||
181 | \answer{}{\mot4}{type=dragfill}{option=nonstop} |
||
182 | \answer{}{\mot5}{type=dragfill}{option=nonstop} |
||
183 | |||
184 | \text{Mot=\reply1 |
||
185 | \reply2 |
||
186 | \reply3 |
||
187 | \reply4 |
||
188 | \reply5} |
||
189 | \text{Mot=wims(replace , by in \Mot)} |
||
190 | \matrix{Mot=\Mot} |
||
191 | \text{STEP=\step <= \N ? r \step:} |