.. _Write Your Own Grader: ############################## Write-Your-Own-Grader Problem ############################## In custom Python-evaluated input (also called "write-your-own-grader" problems), the grader uses a Python script that you create and embed in the problem to evaluates a student's response or provide hints. These problems can be any type. Numerical input and text input problems are the most popular write-your-own-grader problems. .. image:: /Images/CustomPythonExample.png :alt: Image of a write your own grader problem Custom Python-evaluated input problems can include the following: * :ref:`Chemical Equation` * :ref:`Custom JavaScript` * :ref:`Gene Explorer` * :ref:`Molecule Editor` * :ref:`Protein Builder` .. list-table:: :widths: 20 80 * - ``
Enter two integers that sum to 10.
Part 1: Enter two integers that sum to 10.
Part 2: Enter two integers that sum to 20.
Explanation
For part 1, any two numbers of the form n and 10-n, where n is any integer, will work. One possible answer would be the pair 0 and 10.
For part 2, any pair x and 20-x will work, where x is any real number with a finite decimal representation. Both inputs have to be entered either in standard decimal notation or in scientific exponential notation. One possible answer would be the pair 0.5 and 19.5. Another way to write this would be 5e-1 and 1.95e1.
Problem text
Solution or Explanation Heading
Solution or explanation text
Enter two real numbers that sum to 20:
Solution or Explanation Heading
Solution or explanation text
Some problems in the course will utilize randomized parameters. For such problems, after you check your answer you will have the option of resetting the question, which reconstructs the problem with a new set of parameters.
Let (x_1 = $x1) and (x_2 = $x2). What is the value of (x_1+x_2)?
Explanation: