%% This file is generated by preprocessor!
%% Do not edit it by hand.
%% Edit the source file cpp/blackbox.cpp.



\language{en}
\author{XIAO Gang}
\email{xiao@unice.fr}
\format{html}
\text{data=wims(record 0 of table)}
\integer{end=rows(\data)}
\integer{confparm1=\confparm1 notitemof 1,2,3,4?0}
\integer{confparm2=\confparm2 notitemof 1,2,3,4?0}
\text{empty=}
\integer{confparm3=\confparm3 issametext \empty or \confparm3<7 or
 \confparm3>\end?54}
\text{list=wims(values x for x=1 to \end)}
\text{confparm4=wims(listintersect \confparm4 and \list)}
\integer{given=\confparm1>0?\confparm1:randint(1..4)}
\integer{cp=\confparm2=\confparm1?0:\confparm2}
\text{remain=wims(listcomplement \given in 1,2,3,4)}
\text{remain=\candouble issametext yes and \given != 1?\given,\remain}
\integer{ask=\cp>0 and \cp isitemof \remain?\cp:randitem(\remain)}
\title{Casilla vacía}
\text{image=table1.gif}
\text{Data=wims(record 0 of table)}
\text{data=\Data}
\text{empty=}
\if{\confparm4 notsametext \empty and \selective notsametext no}{
 \text{data=row(\confparm4,\data)}
}
\text{totname=column(3,\data)}
\text{totsymbole=column(2,\data)}
\integer{datacnt=min(\confparm3,rows(\data))}
\text{Pdata=wims(record 0 of position)}
\text{pdata=\Pdata}
\text{empty=}
\if{\confparm4 notsametext \empty and \selective notsametext no}{
 \text{pdata=row(\confparm4,\pdata)}
}
\text{totname=column(3,\pdata)}
\text{totsymbole=column(2,\pdata)}
\integer{pdatacnt=min(\confparm3,rows(\pdata))}
\integer{pick=randint(1..\datacnt)}
\text{dataline=\data[\pick;]}
\integer{pick=item(1,\dataline)}
\text{pdataline=\Pdata[\pick;]}
\integer{xs=30}
\integer{ys=30}
\integer{x=\pdataline[4]*\xs}
\integer{y=\pdataline[3]*\ys}
\integer{y=\pdataline[3]>8?\y+5}
\integer{x=\pdataline[3]>8?\x+\xs*2}
\text{blist=}
\for{i=1 to \end}{
 \text{blist=\blist r,\x,\y,\x+\xs,\y+\ys;}
 \if{\i=\pick}{\text{glist=r,\x,\y,\x+\xs,\y+\ys}}
}
\text{good=\dataline[\ask]}
\text{good=\ask=3?\good;\Data[;3]}
\text{namelist=número atómico, símbolo, nombre, masa atómica}
\text{a=r1,r2,r3,r4}
\steps{\a[\ask]}
\statement{En la tabla periódica de los elementos mostrada más abajo,
una casilla está vacía. ¿Cuál es el/la \namelist[\ask] del elemento
correspondiente a esa casilla?
<p><center>
\draw{600,360}{
copy 0,0,-1,-1,-1,-1,\imagedir/\image
frect \x,\y,\x+\xs,\y+\ys,black
}
</center>
}
\answer{El número atómico es}{\good}{type=number}
\answer{El símbolo es}{\good}{type=case}
\answer{El nombre del elemento es}{\good}{type=nocase}
\answer{La masa atómica es}{\good}{type=number}
