\embed{definition}{&nbsp;}
<pre class="fichier">
<div class="variable">
\title{Texte ŕ trous avec choix}
\text{cnt_record = \wims(\recordcnt data)}
\text{H = randint(\\cnt_record)}
\text{texte = \wims(\record \\H of data)}

\text{test = \wims(\nospace \\texte)}
\text{first = \wims(\replace \internal ? \by | <tt class="w">in</tt> \wims(\char 1 of \\test))}
\text{u = \\first \issametext | ? 1 : 0}
\text{u1 = \\u = 0 ? -1:1} 

\matrix{texte = \slib(text/cutchoices \\texte)}
\text{cntrow = \rows(\\texte)}
\integer{cntQ = (\\cntrow+\\u1*\\cntrow%2)/2}
\text{trou = }
\text{rep = }
<tt class="comm">\\for</tt>{i= 1 <tt class="w">to</tt> \\cntQ}{
  \text{trou1 = \\texte[2*\\i-\\u;]}
  \text{cnt = \items(\\trou1)}
  \text{mix = \shuffle(\\cnt)}
  \matrix{trou = \\trou
  \\trou1[\\mix]} 
  \text{rep = \\rep,\position(1,\\mix)}
 }
\text{rep = \wims(\nonempty <tt class="w">items</tt> \\rep)}
\text{STEP = \wims(\makelist r x <tt class="w">for</tt> x = 1 <tt class="w">to</tt> \\cntQ)}
\steps{\\STEP}
</div>

<div class="statement">
\statement{ Compléter le texte :  

&lt;p style="background-color : #AAFFFF;
padding : 1%;
margin : 5% 15%;"> 
<tt class="comm">\\for</tt>{k = 1 <tt class="w">to</tt> \\cntQ}{
    \\texte[2*\\k-1 -\\u ;]  <tt class="comm">\\embed</tt>{\\STEP[\\k]}
 }
\\texte[2*\\cntQ+1 -\\u;]
&lt;/p>
}
</div>
<div class="variable">
\answer{}{\\rep[1];\\trou[1;]}{<tt class="type">type=menu</tt>}
\answer{}{\\rep[2];\\trou[2;]}{<tt class="type">type=menu</tt>}
\answer{}{\\rep[3];\\trou[3;]}{<tt class="type">type=menu</tt>}
\answer{}{\\rep[4];\\trou[4;]}{<tt class="type">type=menu</tt>}
\answer{}{\\rep[5];\\trou[5;]}{<tt class="type">type=menu</tt>}
\answer{}{\\rep[6];\\trou[6;]}{<tt class="type">type=menu</tt>}
\answer{}{\\rep[7];\\trou[7;]}{<tt class="type">type=menu</tt>}
\answer{}{\\rep[8];\\trou[8;]}{<tt class="type">type=menu</tt>}
\answer{}{\\rep[9];\\trou[9;]}{<tt class="type">type=menu</tt>}
\answer{}{\\rep[10];\\trou[10;]}{<tt class="type">type=menu</tt>}
\answer{}{\\rep[11];\\trou[11;]}{<tt class="type">type=menu</tt>}
\answer{}{\\rep[12];\\trou[12;]}{<tt class="type">type=menu</tt>}
\answer{}{\\rep[13];\\trou[13;]}{<tt class="type">type=menu</tt>}
\answer{}{\\rep[14];\\trou[14;]}{<tt class="type">type=menu</tt>}
\answer{}{\\rep[15];\\trou[15;]}{<tt class="type">type=menu</tt>}
\answer{}{\\rep[16];\\trou[16;]}{<tt class="type">type=menu</tt>}
\answer{}{\\rep[17];\\trou[17;]}{<tt class="type">type=menu</tt>}
\answer{}{\\rep[18];\\trou[18;]}{<tt class="type">type=menu</tt>}
\answer{}{\\rep[19];\\trou[19;]}{<tt class="type">type=menu</tt>}
\answer{}{\\rep[20];\\trou[20;]}{<tt class="type">type=menu</tt>}
</div>
</pre>
