.. _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.


**Important**: Python honors indentation. Within the ``

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.

**Templates** The following template includes answers that appear when the student clicks **Show Answer**. .. code-block:: xml

Problem text


Solution or Explanation Heading

Solution or explanation text

The following template does not return answers when the student clicks **Show Answer**. If your problem doesn't include answers for the student to see, make sure to set **Show Answer** to **Never** in the problem component. .. code-block:: xml

Enter two real numbers that sum to 20:


Solution or Explanation Heading

Solution or explanation text