!set title=Tabla parcial 2x2
!if $wims_read_parm!=$empty
 !goto $wims_read_parm
!endif
oef2wims_version=3.22
language=es
author=XIAO, Gang
email=xiao@unice.fr

ansorder=r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r
varcnt=58
prevarcnt=57
postvarcnt=0
replycnt=16
choicecnt=0
conditioncnt=0
feedbackcnt=0
format=html

val1=$imagedir
val2=$confparm1
val3=$confparm2
val4=$confparm3
val5=$confparm4

!if $testcondition=yes
 !goto test
!endif
!if $status=waiting
 !exit
!endif

val6=1,0;0,0
tmp0=!shuffle 2

val7=$(tmp0)
tmp0=!shuffle 2

val8=$(tmp0)
tmp0=!lines2rows $(val6[$val7;$val8])

val6=$(tmp0)
tmp0=!replace ; by , in $val6

val9=$(tmp0)
tmp0=!positionof item 0 in $val9

val10=$(tmp0)
tmp0=!positionof item 1 in $val9

val11=$(tmp0)
tmp0=!item 1 to (2*2) of r1,r2,r3,r4,r5,r6,r7,r8,r9,r10,r11,r12,r13,r14,r15,r16

val12=$(tmp0)
val13=$[rint(2)]
val14=$[rint(2)]
val15=$[rint((2*2))]

!ifval $val2=
val2=$[rint(1)]
!endif

!ifval $val3=
val3=$[rint(1)]
!endif
tmp0=!item $val3 of 1,1,2,2

val16=$(tmp0)
tmp0=!item $val3 of 1,2,1,2

val17=$(tmp0)
tmp0=!item $val16 of +,*

val18=$(tmp0)
tmp0=!item $val17 of +,*

val19=$(tmp0)
tmp0=!item $val16 of Suma,Producto

val20=$(tmp0)
tmp0=!item $val17 of Suma,Producto

val21=$(tmp0)
tmp0=!item $val3 of sum,	        sum or product,	        sum or product,	        product

val22=$(tmp0)
tmp0=!shuffle a,b,c,d,r,s,t,x,y,z

val23=$(tmp0)
tmp0=!randitem 2,3,5

val24=sqrt($(tmp0))
tmp0=!record $val2 of src/data

val25=$(tmp0)
tmp=!translate internal $	$ to ; in $val25

tmp=!row 1 of $tmp
tmp0=!translate internal $\
$ to ; in $tmp
val26=$(tmp0)
tmp=!translate internal $	$ to ; in $val25

tmp=!row 2 of $tmp
tmp0=!translate internal $\
$ to ; in $tmp
val27=$(tmp0)
val28=$(val27[1])
val29=$(val27[2])
val30=$(val27[3])

!ifval $val29 =
val29= 60
!endif

!ifval $val30=
val30= 35
!endif
val31=$val29 $val30
tmp=!translate internal $	$ to ; in $val25

tmp=!row 3 to -1 of $tmp
tmp0=!translate internal $\
$ to ; in $tmp
tmp1=!rows2lines $(tmp0)

val25=$(tmp1)
tmp0=!itemcnt $val25

val32=$[rint($(tmp0))]
!if $val32<=3 
val33=$(val25[1])
val34=$(val25[2])
val35=$(val25[3])
val36=computed
!if $val35<0 
tmp0=!values $val35*x,-($val35)*x for x=$val33 to $val34

val37=$(tmp0)
!else
tmp0=!values $val35*x for x=$val33 to $val34

val37=$(tmp0)
!endif
tmp0=!shuffle $val37

tmp1=!item 1 to $val15 of $(tmp0)

val38=$(tmp1)
!else
val36=listed
tmp0=!shuffle $val25

tmp1=!item 1 to $val15 of $(tmp0)

val38=$(tmp1)
!endif
tmp0=!mathsubst f=$(val23[1]) in $val38

val38=$(tmp0)
tmp0=!mathsubst g=$(val23[2]) in $val38

val38=$(tmp0)
tmp0=!mathsubst rt=$val24 in $val38

val38=$(tmp0)
val39=
val40=($(val38[1])),($(val38[2])),($(val38[3])),($(val38[4])),	($(val38[5])),($(val38[6])),($(val38[7])),($(val38[8])),	($(val38[9])),($(val38[10])),($(val38[11])),($(val38[12])),	($(val38[13])),($(val38[14])),($(val38[15])),($(val38[16]))
val41=
!for val42 =1 to $val13 
tmp0=!replace , by $val18 in $(val40[($val42-1)*$val14+1..$val42*$val14])

val43=$(tmp0)
t_=!replace internal \( by ( in expand($val43)
tmp0=!exec maxima $t_

val43=$(tmp0)
tmp0=!append item $val43 to $val41

val41=$(tmp0)
!next
val44=
!for val45 =1 to $val14 
tmp0=!values $val14*(x-1)+$val45 for x=1 to $val13

tmp1=!replace , by $val19 in $(val40[$(tmp0)])

val35=$(tmp1)
t_=!replace internal \( by ( in expand($val35)
tmp0=!exec maxima $t_

val35=$(tmp0)
tmp0=!append item $val35 to $val44

val44=$(tmp0)
!next
oefsteps=$(val12[$val10]) 
nextstep=!nosubst $(val12[$val10]) 
!readproc oef/steps.proc
replytype1=dragfill
replyname1=Box 1
replygood1=\($(val38[1]))
replytype2=dragfill
replyname2=Box 2
replygood2=\($(val38[2]))
replytype3=dragfill
replyname3=Box 3
replygood3=\($(val38[3]))
replytype4=dragfill
replyname4=Box 4
replygood4=\($(val38[4]))
replytype5=dragfill
replyname5=Box 5
replygood5=\($(val38[5]))
replytype6=dragfill
replyname6=Box 6
replygood6=\($(val38[6]))
replytype7=dragfill
replyname7=Box 7
replygood7=\($(val38[7]))
replytype8=dragfill
replyname8=Box 8
replygood8=\($(val38[8]))
replytype9=dragfill
replyname9=Box 9
replygood9=\($(val38[9]))
replytype10=dragfill
replyname10=Box 10
replygood10=\($(val38[10]))
replytype11=dragfill
replyname11=Box 11
replygood11=\($(val38[11]))
replytype12=dragfill
replyname12=Box 12
replygood12=\($(val38[12]))
replytype13=dragfill
replyname13=Box 13
replygood13=\($(val38[13]))
replytype14=dragfill
replyname14=Box 14
replygood14=\($(val38[14]))
replytype15=dragfill
replyname15=Box 15
replygood15=\($(val38[15]))
replytype16=dragfill
replyname16=Box 16
replygood16=\($(val38[16]))
question=__EXECUTED_1692754_EXERCISE__

!goto stat

!exit

:question
$()<em>$val26</em>.				<p>Rellene la tabla arrastrando dentro de ella los números o las expresiones de abajo,		de manera que cada fila y cada columna produzcan el resultado indicado:	<p>	<table border=2 cellpadding=5>	<tr><td>	 
!for m_cc=1 to 2 
$()<th><small>columna $m_cc</small></th> 
!next
$()	<th>$val20</th></tr>	 
!for m_rr=1 to 2 
$()	<tr><th><small>fila $m_rr	  
!for m_cc=1 to 2 
$()		 <td align=center>	  
!if $(val9[($m_rr-1)*$val14+$m_cc])=1 
$()
!insmath $(val38[($m_rr-1)*$val14+$m_cc])
$() 
!else
$()  
!read oef/embed.phtml $(val12[($m_rr-1)*$val14+$m_cc]),$val31 
$() 
!endif
$()	 </td>				 
!next
$()	<td align=center>
!insmath $(val41[$m_rr])
$()</td></tr>	 
!next
$()	<tr><th>$val21</th>	 
!for m_cc=1 to 2 
$()<td align=center>
!insmath $(val44[$m_cc])
$()</td> 
!next
$()	</tr></table>	
$()
!exit

:hint
$()
$()
!exit

:help
$()
$()
!exit

:solution
$()
$()
!exit

:feedback

!exit

:test

!exit

:stat
vsavelist=9,12,14,20,21,26,31,38,41,44
embedcnt=1
