!set title=Equazione di rette: dal grafico all'equazione
!if $wims_read_parm!=$empty
 !goto $wims_read_parm
!endif
oef2wims_version=3.22
author=Frédéric, PITOUN
email=lva.pitoun@free.fr
language=it
leftrange=-5.000000
rightrange=5.000000
computeanswer=yes
precision=10000

ansorder=r,r
varcnt=17
prevarcnt=16
postvarcnt=0
replycnt=2
choicecnt=0
conditioncnt=0
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(-8)]
val7=$[rint(8)]
val8=$[rint(-8)]
val9=$[rint(8)]
val10=$[rint(1)]
val11=$[rint(1)]
val12=$[rint(($val7-$val6)/$val10)]
val13=$[rint(($val9-$val8)/$val11)]
tmp0=!randint -7, 7

val14=$[rint($(tmp0))]
tmp0=!randint 1, 7

val15=$[rint($(tmp0))]
tmp0=!randint -7, 7

val16=$[rint($(tmp0))]
tmp0=!randint 1, 2

val17=$[rint($(tmp0))]
val18=$[rint($val15*(-1)^$val17)]
t_=!rawmath ($val16-$val14)/$val18
val19=!exec pari print($t_)
t_=!replace internal \( by ( in expand($val19*x+$val14)
tmp0=!exec maxima $t_

val20=!rawmath $(tmp0)
tmp0=!texmath $val20

val21=$(tmp0)
replytype1=default
replyname1=Coefficiente angolare
replygood1=$val19
replytype2=default
replyname2=Ordinata nell'origine
replygood2=$val14
question=__EXECUTED_1692754_EXERCISE__
solution=__EXECUTED_1692754_EXERCISE__

!goto stat

!exit

:question
$()Vogliamo ricavare l'equazione della retta rappresentata in figura e scriverla nella forma 
!insmath y=mx+q
$(). Determinare dal disegno i valori di 
!insmath m
$() e 
!insmath q
$():<br>	<div class="wimscenter">	 
!read oef/draw.phtml 400,400 \
	xrange=$val6,$val7	yrange=$val8,$val9	linewidth=1	parallel $val6,$val8,$val6,$val9,$val10,0,$val12,green	parallel $val6,$val8,$val7,$val8,0,$val11,$val13,green	linewidth=2	line 0,$val8,0,$val9,red	line $val6,0,$val7,0,red		text green,0,0,small,0	text green,$val10,0,small,$val10	text green,0,$val11,small,$val11		linewidth=2	plot blue,$val19*x+$val14	 
$() 	</div>	L'equazione della retta è:	<div class="wimscenter">	
!insmath y=
$()  
!read oef/embed.phtml reply 1,6 
$() 
!insmath x
$() +  
!read oef/embed.phtml reply 2,6 
$()	</div>	
$()
!exit

:hint
$()
$()
!exit

:help
$()
$()
!exit

:solution
$()L'equazione della retta è 
!insmath y = $val21
$()
$()
!exit

:latex
$()
$()
!exit

:feedback

!exit

:test

!exit

:stat
vsavelist=6,7,8,9,10,11,12,13,14,19,21
embedcnt=2
