!!!! fichiers des questions dans l'exercice 1
!!! lu par var.init

!!! QUESTIONS  EXO 1


!!!!!if $mode=1

nx= !randint 2,$[$nX-1]
ny= !randint 2,$[$nY-1]
x=!item $nx of $X
x1=!item $[$nx-1] of $X 
x2=!item $[$nx+1] of $X 
y=!item $ny of $Y
y2=!item $[$ny+1] of $Y
!!! descriptifs des tout
descTout= $pop
descTout=!append line  $pop to $descTout
descTout=!append line  $pop ayant un $nomX au moins gal  $x $unitX to $descTout
descTout=!append line  $pop ayant moins de $y $unitY comme $nomY to $descTout
!!! descriptifs des parties
descPart=!append line le $nomX est infrieur strictement  $x $unitX to $descPart
descPart=!append line la $nomY est suprieure ou gale  $y $unitY to $descPart
descPart=!append line la $nomY en $unitY se situe dans [$y , $y2[ to $descPart
descPart=!append line le $nomX en $unitX se situe dans [$x1 , $x2[ to $descPart

!!!! questions 
!!!! voir present.html

!!! calculs des tout dans l'ordre des questions
!!! pour les deux premiers pas besoin de dtailler la sol.
cardTout= $tot, $tot
solTout=$tot, $tot
totX = !column -1 of $data
totY=!line -1 of $data
tot=0
!for i= $nx to $nX
     t = !item $i of $totX
     !if $tot=0
          tot=$t
     !else
          tot = $tot + $t
     !endif
!next i 
cardTout=!append item $[$tot] to $cardTout
solTout=!append item $tot to $solTout
tot=0
!for i= 1 to $[$ny-1]
     t = !item $i of $totY
     !if $tot=0
          tot=$t
     !else
          tot = $tot + $t
     !endif
!next i 
cardTout=!append item $[$tot] to $cardTout
solTout=!append item $tot to $solTout

!!!!  calculs des parties dans l'ordre des questions
tot=0
!for i= 1 to $[$nx-1]
     t = !item $i of $totX
     !if $tot=0
          tot=$t
     !else
          tot = $tot + $t
     !endif
!next i 
cardPart=!append item $[$tot] to $cardPart
solPart=!append item $tot to $solPart
tot=0
!for j= $ny to $nY
     t = !item $j of $totY
     !if $tot=0
          tot=$t
     !else
          tot = $tot + $t
     !endif
!next j 
cardPart=!append item $[$tot] to $cardPart
solPart=!append item $tot to $solPart
tot=0
part= !column $ny of $data
!for i= $nx to $nX
     t = !item $i of $part
     !if $tot=0
          tot=$t
     !else
          tot = $tot + $t
     !endif
!next i 
cardPart=!append item $[$tot] to $cardPart
solPart=!append item $tot to $solPart
tot=0
!for j= 1 to $[$ny-1]
    part= !column $j of $data
    !for i= $[$nx-1] to $nx
         t = !item $i of $part
     !if $tot=0
          tot=$t
     !else
          tot = $tot + $t
     !endif
    !next i  
!next j
cardPart=!append item $[$tot] to $cardPart
solPart=!append item $tot to $solPart

!!! les taux en pourcentage
!for n=1 to 4
   part=!item $n of $cardPart
   tout=!item $n of $cardTout
   frac=!append item $part/$tout to $frac 
   res= !exec pari round(1000*$part/$tout)*0.1
   taux=!append item $res to $taux
!next n

!!!nbsteps=!linecnt $descPart

nbsteps=4

!!!!!!endif
!!!! FIN QUESTIONS EXO 1!