!changeto exos/exo7
!exit
!set n=$counter
!if $level =0
    R=$counter
!else
    R=$level
!endif        
exotext=!record 63 of lang/remarks.$taal
#@ De Rekenkundige Rij<br>Geef de termen
ss=!record 64 of lang/remarks.$taal
#@ Gegeven de onderstaande <em>lineaire functie</em><br>Met <em>f</em>&nbsp;\
#@ kun je een rij maken met: u<sub>1</sub>=<em>f</em>(0) , u<sub>2</sub>=<em>f</em>(2) ,\
#@ u<sub>3</sub>=<em>f</em>(2) ...<br>Geef de eerst $options termen van deze rij.
questiontype=0
math=0
image=0
options=!randitem 3,4,5,6
pm=!randitem +,-
question$n=$ss
checkfile=exos/checkfile1.proc
var2=$empty
exotext=!record 97 of lang/remarks.$taal
!if $R=1
    a=!randitem 2,3,4,5,6,7,8,9,10,11,12
    b=!randitem 2,3,4,-2,-3,-4
    formula$n=f(x)\,\,=\,\, $b \cdot x $pm $a
    !for p=1 to $options
	var2=!append item $p to $var2
	G=$[$b*$p $pm $a]
	answer$n=!append item $G to $(answer$n)
	textanswer$n=!append line <li>u<sub>$p</sub>=$G</li> to $(textanswer$n)
    !next p
    textanswer$n=<ul>$(textanswer$n)</ul>
 !exit
!endif

!if $R>1
    a=!randitem 2,3,4,5,6,7,8,9,10,11,12
    b=!randitem 2,3,1/2,1/3,1/4,1/5,2/3,3/4,4/5,-2,-3,-1/2,-1/3,-1/4,-1/5,-2/3,-3/4,-4/5
    formula$n=!texmath f(x) = $b*x $pm $a
    parivraag=$empty
    !for p=1 to $options
	parivraag=!append line ($b)*$p $pm ($a) to $parivraag 
    !next p
    totaal=!exec pari $parivraag
    !for p=1 to $options
	var2=!append item $p to $var2
	G=!line $p of $totaal
	answer$n=!append item $G to $(answer$n)
	textanswer$n=!append line <li>u<sub>$p</sub>=$G</li> to $(textanswer$n)
    !next p
    textanswer$n=<ul>$(textanswer$n)</ul>
 !exit
!endif

