!set title=Simple fraction I
!if $wims_read_parm!=$empty
 !goto $wims_read_parm
!endif
oef2wims_version=3.22
author=Gang Xiao
email=xiao@unice.fr
language=en

varcnt=19
prevarcnt=15
postvarcnt=3
replycnt=0
choicecnt=0
conditioncnt=1
feedbackcnt=0
format=html

val1=$imagedir

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

m_options=nofloat askresult
m_methods=ineq/addterm, ineq/mulexp, ineq/divexp, ineq/exsides
m_minsteps=3
tmp0=!randitem a,b,c,d,p,q,r,s,t,u,v,x,y,z

val2=$(tmp0)
tmp0=!shuffle 15

val3=$(tmp0)
tmp0=!item 1 of $val3

tmp1=!randitem -1,1

val4=$[rint(($(tmp0)+1)*$(tmp1))]
tmp0=!item 2 of $val3

tmp1=!randitem -1,1

val5=$[rint(($(tmp0)+1)*$(tmp1))]
tmp0=!item 3 of $val3

val6=$[rint(($(tmp0)+1))]
val7=$[rint(-($val5))]
tmp=!trim >,<,1	<,>,-1	
val8=!translate internal $	\
$ to ;; in $tmp
tmp=!translate internal $	$ to ; in $val8

tmp=!nonempty rows $tmp
tmp=!randrow $tmp
tmp0=!translate internal $\
$ to ; in $tmp
val8=$(tmp0)
tmp0=!item 1 of $val8

val9=$(tmp0)
tmp0=!item 2 of $val8

val10=$(tmp0)
tmp0=!item 3 of $val8

val11=$[rint($(tmp0))]
val12=!rawmath ($val2 + $val4)/($val2 + $val5)
val13=$[($val4-($val5))*($val11)]

!ifval $val13>0
val6=$[rint(1+$val6)]
!else
val6=$[rint(1-$val6)]
!endif
tmp0=!randitem <,>,<=,>=

val14=$(tmp0)
m_equivalence=$val12 $val14 $val6
m_context=$val2 $val9 $val7
question=__EXECUTED_1692754_EXERCISE__

!goto stat

!exit

:question
$()	Solve the inequality 
!insmath $val12 $val14 $val6
$(), under the condition	
!insmath $val2 $val9 $val7
$().	<p>	The goal of the exercise is to transform the given inequality into an	equivalent one whose left side is $val2, and whos right side is a constant.	
$()
!exit

:hint
$()
$()
!exit

:help
$()
$()
!exit

:solution
$()
$()
!exit

:postdef
tmp0=!translate internal <=> to , , in $m_equivalence

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

val16=$(tmp0)
tmp0=!item 2 of $val15

val17=$(tmp0)

!exit

:feedback

!exit

:test

!ifval $val16 issametext $val2 and $val2 notin $val17
 condtest1=1
!else
 condtest1=0
!endif
condname1=

!exit

:stat
vsavelist=2,6,7,9,12,14
embedcnt=0
