Advertisement
eduardoperezl

Ejemplo Variables Aleatorias

Sep 14th, 2016
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 0.70 KB | None | 0 0
  1. <problem>
  2.   <p>Algunos problemas en el curso utilizarán parámetros aleatorizados.
  3.     Para tales problemas, despues de que verifiques la respuesta tendras
  4.     la opción de restablcer la pregunta, lo cual reconstruye el problema
  5.     con un nuevo conjunto de parámetros.</p>
  6. <script type="loncapa/python">
  7. x1 = random.randint(0, 100)
  8. x2 = random.randint(0, 100)
  9. y = x1+x2
  10. </script>
  11. <p>Con (x_1 = $x1) and (x_2 = $x2). ¿Cuál es el valor de (x_1+x_2)?</p>
  12. <numericalresponse answer="$y">
  13.   <responseparam type="tolerance" default="0.01%" name="tol"
  14.    description="Numerical Tolerance"/>
  15.   <textline size="10"/>
  16. </numericalresponse>
  17. <solution>
  18.   <p><b>Explicación:</b></p>
  19. </solution>
  20. </problem>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement