!set title=Tabla aritmética 3x5
!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=66
prevarcnt=50
postvarcnt=15
replycnt=16
choicecnt=0
conditioncnt=8
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=$[rint(3)]
val7=$[rint(5)]
val8=$[rint((3*5))]

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

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

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

val10=$(tmp0)
tmp0=!item $val9 of +,*

val11=$(tmp0)
tmp0=!item $val10 of +,*

val12=$(tmp0)
tmp0=!item $val9 of Suma,Producto

val13=$(tmp0)
tmp0=!item $val10 of Suma,Producto

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

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

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

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

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

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

tmp=!row 2 of $tmp
tmp0=!translate internal $\
$ to ; in $tmp
val20=$(tmp0)
val21=$(val20[1])
val22=$(val20[2])
val23=$(val20[3])

!ifval $val22 =
val22= 60
!endif

!ifval $val23=
val23= 35
!endif
val24=$val22 $val23
tmp=!translate internal $	$ to ; in $val18

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

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

val25=$[rint($(tmp0))]
!if $val25<=3 
val26=$(val18[1])
val27=$(val18[2])
val28=$(val18[3])
val29=computed
!if $val28<0 
tmp0=!values $val28*x,-($val28)*x for x=$val26 to $val27

val30=$(tmp0)
!else
tmp0=!values $val28*x for x=$val26 to $val27

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

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

val31=$(tmp1)
!else
val29=listed
tmp0=!shuffle $val18

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

val31=$(tmp1)
!endif
tmp0=!mathsubst f=$(val16[1]) in $val31

val31=$(tmp0)
tmp0=!mathsubst g=$(val16[2]) in $val31

val31=$(tmp0)
tmp0=!mathsubst rt=$val17 in $val31

val31=$(tmp0)
val32=
val33=($(val31[1])),($(val31[2])),($(val31[3])),($(val31[4])),	($(val31[5])),($(val31[6])),($(val31[7])),($(val31[8])),	($(val31[9])),($(val31[10])),($(val31[11])),($(val31[12])),	($(val31[13])),($(val31[14])),($(val31[15])),($(val31[16]))
val34=
!for val35 =1 to $val6 
tmp0=!replace , by $val11 in $(val33[($val35-1)*$val7+1..$val35*$val7])

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

val36=$(tmp0)
tmp0=!append item $val36 to $val34

val34=$(tmp0)
!next
val37=
!for val38 =1 to $val7 
tmp0=!values $val7*(x-1)+$val38 for x=1 to $val6

tmp1=!replace , by $val12 in $(val33[$(tmp0)])

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

val28=$(tmp0)
tmp0=!append item $val28 to $val37

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

val39=$(tmp0)
oefsteps=$val39 
nextstep=!nosubst $val39 
!readproc oef/steps.proc
replytype1=dragfill
replyname1=Box 1
replygood1=?analyze 40;\($(val31[1]))
replytype2=dragfill
replyname2=Box 2
replygood2=?analyze 41;\($(val31[2]))
replytype3=dragfill
replyname3=Box 3
replygood3=?analyze 42;\($(val31[3]))
replytype4=dragfill
replyname4=Box 4
replygood4=?analyze 43;\($(val31[4]))
replytype5=dragfill
replyname5=Box 5
replygood5=?analyze 44;\($(val31[5]))
replytype6=dragfill
replyname6=Box 6
replygood6=?analyze 45;\($(val31[6]))
replytype7=dragfill
replyname7=Box 7
replygood7=?analyze 46;\($(val31[7]))
replytype8=dragfill
replyname8=Box 8
replygood8=?analyze 47;\($(val31[8]))
replytype9=dragfill
replyname9=Box 9
replygood9=?analyze 48;\($(val31[9]))
replytype10=dragfill
replyname10=Box 10
replygood10=?analyze 49;\($(val31[10]))
replytype11=dragfill
replyname11=Box 11
replygood11=?analyze 50;\($(val31[11]))
replytype12=dragfill
replyname12=Box 12
replygood12=?analyze 51;\($(val31[12]))
replytype13=dragfill
replyname13=Box 13
replygood13=?analyze 52;\($(val31[13]))
replytype14=dragfill
replyname14=Box 14
replygood14=?analyze 53;\($(val31[14]))
replytype15=dragfill
replyname15=Box 15
replygood15=?analyze 54;\($(val31[15]))
replytype16=dragfill
replyname16=Box 16
replygood16=?analyze 55;\($(val31[16]))
question=__EXECUTED_1692754_EXERCISE__

!goto stat

!exit

:question
$()<em>$val19</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 5 
$()<th><small>columna $m_cc</small></th> 
!next
$()	<th>$val13</th></tr>	 
!for m_rr=1 to 3 
$()	<tr><th><small>fila $m_rr	  
!for m_cc=1 to 5 
$()							  <td align=center> 
!read oef/embed.phtml $(val39[($m_rr-1)*$val7+$m_cc]),$val24 
$()</td>		 
!next
$()	<td align=center>
!insmath $(val34[$m_rr])
$()</td></tr>	 
!next
$()	<tr><th>$val14</th>	 
!for m_cc=1 to 5 
$()<td align=center>
!insmath $(val37[$m_cc])
$()</td> 
!next
$()	</tr></table>	
$()
!exit

:hint
$()
$()
!exit

:help
$()
$()
!exit

:solution
$()
$()
!exit

:postdef
tmp0=!replace internal \ by $val32 in	  $val40,$val41,$val42,$val43,$val44,$val45,$val46,$val47,$val48,$val49,$val50,$val51,$val52,$val53,$val54,$val55

val56=$(tmp0)
val57=
!for val35 =1 to $val6 
tmp0=!replace , by $val11 in $(val56[($val35-1)*$val7+1..$val35*$val7])

val41=$(tmp0)
!if $val29 issametext computed 
val58=$[$(val34[$val35])-($val41)]
!else
t_=!replace internal \( by ( in expand(($(val34[$val35]))-($val41))
tmp0=!exec maxima $t_

val58=$(tmp0)
!endif

!ifval $val58 issametext 
val58=NaN
!endif
tmp0=!append item $val58 to $val57

val57=$(tmp0)
!next
val59=
!for val38 =1 to $val7 
tmp0=!values $val7*(x-1)+$val38 for x=1 to $val6

tmp1=!replace , by $val12 in $(val56[$(tmp0)])

val60=$(tmp1)
!if $val29 issametext computed 
val61=$[$(val37[$val38])-($val60)]
!else
t_=!replace internal \( by ( in expand(($(val37[$val38]))-($val60))
tmp0=!exec maxima $t_

val61=$(tmp0)
!endif

!ifval $val61 issametext 
val61=NaN
!endif
tmp0=!append item $val61 to $val59

val59=$(tmp0)
!next

!exit

:feedback

!exit

:test

!ifval $(val57[1]) = 0
 condtest1=1
!else
 condtest1=0
!endif
condname1=$val13 of row 1 equals \($(val34[1]))

!ifval $(val57[2]) = 0
 condtest2=1
!else
 condtest2=0
!endif
condname2=$val13 of row 2 equals \($(val34[2]))

!ifval $(val57[3]) = 0
 condtest3=1
!else
 condtest3=0
!endif
condname3=$val13 of row 3 equals \($(val34[3]))

!ifval $(val59[1]) = 0
 condtest4=1
!else
 condtest4=0
!endif
condname4=$val14 of column 1 equals \($(val37[1]))

!ifval $(val59[2]) = 0
 condtest5=1
!else
 condtest5=0
!endif
condname5=$val14 of column 2 equals \($(val37[2]))

!ifval $(val59[3]) = 0
 condtest6=1
!else
 condtest6=0
!endif
condname6=$val14 of column 3 equals \($(val37[3]))

!ifval $(val59[4]) = 0
 condtest7=1
!else
 condtest7=0
!endif
condname7=$val14 of column 4 equals \($(val37[4]))

!ifval $(val59[5]) = 0
 condtest8=1
!else
 condtest8=0
!endif
condname8=$val14 of column 5 equals \($(val37[5]))

!exit

:stat
vsavelist=6,7,11,12,13,14,19,24,29,32,34,35,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55
embedcnt=1
