!set title=Carrés (nonstop)
!if $wims_read_parm!=$empty
 !goto $wims_read_parm
!endif
oef2wims_version=3.22

ansorder=r,r,r
varcnt=11
prevarcnt=7
postvarcnt=3
replycnt=3
choicecnt=0
conditioncnt=0
feedbackcnt=1
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)]
tmp0=!randint 3, 4

val7=$[rint($(tmp0))]
tmp0=!values x for x = $val7 to $val6 + $val7

val8=$(tmp0)
tmp0=!values x^2 for x = $val7 to $val6 + $val7

val9=$(tmp0)
tmp0=!makelist \(x^2) for x = $val7 to $val6 + $val7 - 1

val10=$(tmp0)
val11=r1
val12=1
dynsteps=yes
oefsteps=$val11 
nextstep=!nosubst $val11 
!readproc oef/steps.proc
replytype1=numeric
replyoption1=nonstop 
replyname1=$(val10[1])
replygood1=$[$(val9[1])]
replytype2=numeric
replyoption2=nonstop 
replyname2=$(val10[2])
replygood2=$[$(val9[2])]
replytype3=numeric
replyoption3=nonstop 
replyname3=$(val10[3])
replygood3=$[$(val9[3])]
question=__EXECUTED_1692754_EXERCISE__

!goto stat

!exit

:question
$()	  
!if $m_step = 1 
$()Calculer le carré de $(val8[1]) : 	   <p align="center">  
!read oef/embed.phtml r 1, 5 
$() </p>	  
!endif
$()	  
!if $m_step = 2 
$()Calculer le carré de $(val8[2])	   <p align="center">  
!read oef/embed.phtml r $(val11[1]), 5 
$() </p>	    
!if $val12 = 2 
$() 	      et le carré de $(val8[3])	     <p align="center">  
!read oef/embed.phtml r $(val11[2]), 5 
$() </p>	    
!endif
$()	   
!endif
$()	
$()
!exit

:hint
$()
$()
!exit

:help
$()
$()
!exit

:solution
$()
$()
!exit

:postdef
!if $m_step = 2 

!ifval $(val9[1]) = $m_reply1 
val11= r2 
!else
val11= r2,r3
!endif
!else
val11=
!endif
tmp0=!itemcnt $val11

val12=$[rint($(tmp0))]

!exit

:feedback
!ifval 1=1
 <p>$(val9[1]) = $m_reply1
$()
!endif

!exit

:test

!exit

:stat
vsavelist=8,9,11,12
embedcnt=3
