\title{Distancia sobre la recta graduada}
\language{es}
\range{-5..5}
\author{Bernadette PERRIN-RIOU}
\email{bpr@math.u-psud.fr}
\computeanswer{no}
\format{html}
\precision{10000}
\integer{m=3}
\integer{n=3}
\text{a=0}
\text{dessin=}
\for{i=-\m to \n}{
\integer{a=\i}
\integer{s=\i}
\text{dessin=\dessin
text  black, \s,-1,  medium,\a}}

\real{A=random(1,-1)*randint(0..10*\m-1)/10}
\real{B=random(1,-1)*randint(0..10*\m-1)/10}
\real{distance=abs(\A-(\B))}
\text{A=\A>0? +\A}
\text{B=\B>0? +\B}
\statement{Ayudándose de la regla graduada, determinar la distancia entre los puntos \(A (\A)) y \(B (\B)). 

<center>\draw{600,50}
{xrange -\m-0.1,3
yrange -2,2
hline black,0,0
arrow  2.5,0,3,0,10,black
parallel  -\m,-0.8,-\m,0.4,1/2,0, 40, blue
parallel  -\m,-0.3,-\m,0.3,1/10,0, 200, blue
parallel  -\m,-0.8,-\m,0.6,1,0, 40, red
\dessin
}
</center>
}
\answer{Distancia entre \(A) y \(B)}{\distance}{type=numeric}
