!set n=$counter
image=0
!if $level=0
    R=$counter
!else
    R=$level
!endif        
inputs=2
cols=20
rows=2
XSIZE=650
inputtext1=!record 4 of lang/remarks.$taal
inputtext2=!record 5 of lang/remarks.$taal
varlist=$empty
arglist=$empty
varcnt=0
afrondingsfactor=0
wordmax=40
math=0

complex=1
checkfile=exos/checkfile4.proc
#checkfile=$checkdir/number.proc
var1=yes
# betekend: volgorde bij meerdere antwoorden doet er toe in number.proc
!if $R=1
    a=!randitem 1,2,3,4,5
    num=!randint 1,8
    lijst=!record $num of exos/data2
!endif

!if $R=2
    a=!randitem 1/2,1,1/4
    b=!randitem 1,1/2*sqrt(2)
    num=!randint 9,20
    lijst=!record $num of exos/data2
!endif

!if $R=3
    a=!randitem 1,2,3,4,5
    b=!randitem 1,2,3,4,5
    num=!randint 9,20
    lijst=!record $num of exos/data2
!endif    

!if $R>3
    image=0
    a=!randitem 1,2,3,4,5
    b=!randitem 1,2,3,4,5    
    num=!randint 21,52
    lijst=!record $num of exos/data2
!endif
helptext=$empty
question$n=!record 3 of lang/remarks.$taal

!if $teaching=1
    sometext=!record 71 of lang/remarks.$taal
    exotext=</p><a onmouseover="return escape('<img src=$module_dir/gifs/exo4.jpg>')">$sometext</a>
!else
    exotext=$empty    
!endif
lijst=!replace internal @ by , in $lijst
formula$n=!item 1 of $lijst
formula$n=!texmath $(formula$n) 
mytexsize=+2
#question$n=$(question$n) <p align="center"><table border=1 cellpadding="20"><td align="center" valign="center" style="font-size:16px;">$formula</td></table>
modulus=!item 2 of $lijst
argument=!item 3 of $lijst
!if sqrt isin $modulus
    modulus=!exec maxima $modulus
!else
    modulus=!exec pari $modulus
!endif

answer$n=$modulus,$argument
!for p in pi,cdot,sqrt
    P=\$p
    modulus=!replace internal $p by $P in $modulus
    argument=!replace internal $p by $P in $argument
!next p
modulus=!replace internal * by $ \cdot $ in $modulus
argument=!replace internal * by $ \cdot $ in $argument
texanswer$n=\left[ \begin{array}{l} modulus=$modulus \\ arg=$argument \end{array}
#!if $image=1
#    XSIZE=200
#    YSIZE=200
#    x=!item 4 of $lijst
#    y=!item 5 of $lijst
##    xmax=$[(abs($x)) + 2]
##    xmin=$[-1*$xmax]
##    ymax=$[(abs($y)) + 2]
##    ymin=$[-1*$ymax]
#    xmin=-5
#    ymin=-5
#    xmax=5
#    ymax=5
#
#    image$n=$xsize,$ysize\
#    transparent white\
#    xrange $xmin,$xmax\
#    yrange $ymin,$ymax\
#    hline 0,0,blue\
#    vline 0,0,blue\
#    dline 0,$y,$x,$y,green\
#    dline $x,0,$x,$y,green\
#    arrow 0,0,$x,0,7,green\
#    arrow 0,0,0,$y,7,green\
#    linewidth 2\
#    arrow 0,0,$x,$y,7,red
#!endif

!exit    
