<commit_before>---
metadata:
    display_name: Problem Written in LaTeX
    source_code: |
        % Nearly any kind of edX problem can be authored using Latex as
        % the source language.  Write latex as usual, including equations.  The
        % key new feature is the \edXabox{} macro, which specifies an "Answer
        % Box" that queries students for a response, and specifies what the
        % epxected (correct) answer is.
        
        %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
        \subsection{Example "option" problem}
        
        Where is the earth?
        
        \edXabox{options='up','down' expect='down'}
        
        %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
        \subsection{Example "symbolic" problem}
        
        What is Einstein's equation for the energy equivalent of a mass $m$?
        
        \edXabox{type='symbolic' size='90' expect='m*c^2' }
        
        %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
        \subsection{Example "numerical" problem}
        
        Estimate the energy savings (in J/y) if all the people
        ($3\times 10^8$) in the U.~S. switched from U.~S. code to low flow
        shower heads.
        
        \edXinline{Energy saved = }\edXabox{expect="0.52" type="numerical" tolerance='0.02' inline='1' } %
        \edXinline{~EJ/year}
        
        %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
        \subsection{Example "multiple choice" problem}
        
        What color is a banana?
        
        \edXabox{ type="multichoice" expect="Yellow" options="Red","Green","Yellow","Blue" }
        
        %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
        \subsection{Example "string response" problem}
        
        In what U.S. state is Detroit located?
        
        \edXabox{ type="string" expect="Michigan" options="ci" }
        
        An explanation of the answer can be provided by using the edXsolution
        macro.  Click on "Show Answer" to see the solution.
        
        \begin{edXsolution}
        Detroit is near Canada, but it is actually in the United States.
        \end{edXsolution}
                
        %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
        \subsection{Example "custom response" problem}
        
        This problem demonstrates the use of a custom python script used for
        checking the answer.
        
        \begin{edXscript}
        def sumtest(expect,ans):
            (a1,a2) = map(float,eval(ans))
            return (a1+a2)==10
        \end{edXscript}
        
        Enter a python list of two numbers which sum to 10, eg [9,1]:
        
        \edXabox{expect="[1,9]" type="custom" cfn="sumtest"}
        
        %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
        \subsection{Example image}
        
        Include image by using the edXxml macro:
        
        \edXxml{<img src="http://autoid.mit.edu/images/mit_dome.jpg"/>}
        
        %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
        \subsection{Example show/hide explanation}
        
        Extra explanations can be tucked away behind a "showhide" toggle flag:
        
        \edXshowhide{sh1}{More explanation}{This is a hidden explanation.  It
        can contain equations: $\alpha = \frac{2}{\sqrt{1+\gamma}}$ }
        
        This is some text after the showhide example.
    markdown: !!null

data: |
    <?xml version="1.0"?>
    <problem>
      <text>
        <p>
          <h4>Example "option" problem</h4>
        </p>
        <p>
    Where is the earth? </p>
        <p>
          <optionresponse>
            <optioninput options="('up','down')" correct="down" label="Where is the earth?"/>
          </optionresponse>
        </p>
        <p>
          <h4>Example "symbolic" problem</h4>
        </p>
        <p>
    What is Einstein's equation for the energy equivalent of a mass [mathjaxinline]m[/mathjaxinline]? </p>
        <p>
          <symbolicresponse expect="m*c^2">
            <textline size="90" correct_answer="m*c^2" math="1" label="Enter Einstein's equation"/>
          </symbolicresponse>
        </p>
        <p>
          <h4>Example "numerical" problem</h4>
        </p>
        <p>
    Estimate the energy savings (in J/y) if all the people ([mathjaxinline]3\times 10^8[/mathjaxinline]) in the U.&#xA0;S. switched from U.&#xA0;S. code to low flow shower heads. </p>
        <p>
          <p style="display:inline">Energy saved = </p>
          <numericalresponse inline="1" answer="0.52">
            <responseparam description="Numerical Tolerance" type="tolerance" default="0.02" name="tol"/>
            <formulaequationinput label="Enter the equation"/>
          </numericalresponse>
          <p style="display:inline">&#xA0;EJ/year</p>
        </p>
        <p>
          <h4>Example "multiple choice" problem</h4>
        </p>
        <p>
    What color is a banana? </p>
        <p>
          <choiceresponse>
            <checkboxgroup label="What color is a banana?">
              <choice correct="false" name="1">
                <text>Red</text>
              </choice>
              <choice correct="false" name="2">
                <text>Green</text>
              </choice>
              <choice correct="true" name="3">
                <text>Yellow</text>
              </choice>
              <choice correct="false" name="4">
                <text>Blue</text>
              </choice>
            </checkboxgroup>
          </choiceresponse>
        </p>
        <p>
          <h4>Example "string response" problem</h4>
        </p>
        <p>
    In what U.S. state is Detroit located? </p>
        <p>
          <stringresponse answer="Michigan">
            <textline label="What state contains Michigan?"/>
          </stringresponse>
        </p>
        <p>
    An explanation of the answer can be provided by using the edXsolution macro: </p>
        <p>
          <solution>
            <font color="blue">Answer: </font>
            <font color="blue">Detroit is near Canada, but it is actually in the United States. </font>
          </solution>
        </p>
        <p>
          <h4>Example "custom response" problem</h4>
        </p>
        <p>
    This problem demonstrates the use of a custom python script used for checking the answer. </p>
        <script type="text/python" system_path="python_lib">
    def sumtest(expect,ans):
        (a1,a2) = map(float,eval(ans))
        return (a1+a2)==10
    </script>
        <p>
    Enter a python list of two numbers which sum to 10, eg [9,1]: </p>
        <p>
          <customresponse cfn="sumtest" expect="[1,9]">
            <textline correct_answer="[1,9]" label="Enter the python list"/>
          </customresponse>
        </p>
        <p>
          <h4>Example image</h4>
        </p>
        <p>
    Include image by using the edXxml macro: </p>
        <p>
          <img src="/static/images/mit_dome.jpg"/>
        </p><commit_msg>update latex problem data (TNL-264)<commit_after>---
metadata:
    display_name: Problem Written in LaTeX
    source_code: |
        % Nearly any kind of edX problem can be authored using Latex as
        % the source language.  Write latex as usual, including equations.  The
        % key new feature is the \edXabox{} macro, which specifies an "Answer
        % Box" that queries students for a response, and specifies what the
        % epxected (correct) answer is.

        %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
        \subsection{Example "option" problem}

        Where is the earth?

        \edXabox{options='up','down' expect='down'}

        %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
        \subsection{Example "symbolic" problem}

        What is Einstein's equation for the energy equivalent of a mass $m$?

        \edXabox{type='symbolic' size='90' expect='m*c^2' }

        %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
        \subsection{Example "numerical" problem}

        Estimate the energy savings (in J/y) if all the people
        ($3\times 10^8$) in the U.~S. switched from U.~S. code to low flow
        shower heads.

        \edXinline{Energy saved = }\edXabox{expect="0.52" type="numerical" tolerance='0.02' inline='1' } %
        \edXinline{~EJ/year}

        %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
        \subsection{Example "multiple choice" problem}

        What color is a banana?

        \edXabox{ type="multichoice" expect="Yellow" options="Red","Green","Yellow","Blue" }

        %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
        \subsection{Example "string response" problem}

        In what U.S. state is Detroit located?

        \edXabox{ type="string" expect="Michigan" options="ci" }

        An explanation of the answer can be provided by using the edXsolution
        macro.  Click on "Show Answer" to see the solution.

        \begin{edXsolution}
        Detroit is near Canada, but it is actually in the United States.
        \end{edXsolution}

        %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
        \subsection{Example "custom response" problem}

        This problem demonstrates the use of a custom python script used for
        checking the answer.

        \begin{edXscript}
        def sumtest(expect,ans):
            (a1,a2) = map(float,eval(ans))
            return (a1+a2)==10
        \end{edXscript}

        Enter a python list of two numbers which sum to 10, eg [9,1]:

        \edXabox{expect="[1,9]" type="custom" cfn="sumtest"}

        %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
        \subsection{Example image}

        Include image by using the edXxml macro:

        \edXxml{<img src="https://courses.edx.org/static/images/mit_dome.jpg"/>}

        %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
        \subsection{Example show/hide explanation}

        Extra explanations can be tucked away behind a "showhide" toggle flag:

        \edXshowhide{sh1}{More explanation}{This is a hidden explanation.  It
        can contain equations: $\alpha = \frac{2}{\sqrt{1+\gamma}}$ }

        This is some text after the showhide example.
    markdown: !!null

data: |
    <?xml version="1.0"?>
    <problem showanswer="closed" rerandomize="never" weight="10" display_name="lec1_Q2">
      <text>
        <p>
          <h4>Example "option" problem</h4>
        </p>
        <p>
    Where is the earth? </p>
        <p>
          <optionresponse>
            <optioninput options="('up','down')" correct="down"/>
          </optionresponse>
        </p>
        <p>
          <h4>Example "symbolic" problem</h4>
        </p>
        <p>
    What is Einstein's equation for the energy equivalent of a mass [mathjaxinline]m[/mathjaxinline]? </p>
        <p>
          <symbolicresponse expect="m*c^2">
            <textline size="90" correct_answer="m*c^2" math="1"/>
          </symbolicresponse>
        </p>
        <p>
          <h4>Example "numerical" problem</h4>
        </p>
        <p>
    Estimate the energy savings (in J/y) if all the people ([mathjaxinline]3\times 10^8[/mathjaxinline]) in the U.&#xA0;S. switched from U.&#xA0;S. code to low flow shower heads. </p>
        <p>
          <p style="display:inline">Energy saved = </p>
          <numericalresponse inline="1" answer="0.52">
            <textline inline="1">
              <responseparam type="tolerance" default="0.02"/>
            </textline>
          </numericalresponse>
          <p style="display:inline">&#xA0;EJ/year</p>
        </p>
        <p>
          <h4>Example "multiple choice" problem</h4>
        </p>
        <p>
    What color is a banana? </p>
        <p>
          <multiplechoiceresponse>
            <choicegroup direction="vertical">
              <choice correct="false" name="1">
                <text> Red</text>
              </choice>
              <choice correct="false" name="2">
                <text> Green</text>
              </choice>
              <choice correct="true" name="3">
                <text> Yellow</text>
              </choice>
              <choice correct="false" name="4">
                <text> Blue</text>
              </choice>
            </choicegroup>
          </multiplechoiceresponse>
        </p>
        <p>
          <h4>Example "string response" problem</h4>
        </p>
        <p>
    In what U.S. state is Detroit located? </p>
        <p>
          <stringresponse answer="Michigan">
            <textline/>
          </stringresponse>
        </p>
        <p>
    An explanation of the answer can be provided by using the edXsolution macro. Click on "Show Answer" to see the solution. </p>
        <p>
          <solution>
            <font color="blue">Answer: </font>
            <font color="blue">Detroit is near Canada, but it is actually in the United States. </font>
          </solution>
        </p>
        <p>
          <h4>Example "custom response" problem</h4>
        </p>
        <p>
    This problem demonstrates the use of a custom python script used for checking the answer. </p>
        <script type="text/python" system_path="python_lib">
    def sumtest(expect,ans):
        (a1,a2) = map(float,eval(ans))
        return (a1+a2)==10
    </script>
        <p>
    Enter a python list of two numbers which sum to 10, eg [9,1]: </p>
        <p>
          <customresponse cfn="sumtest" expect="[1,9]">
            <textline correct_answer="[1,9]"/>
          </customresponse>
        </p>
        <p>
          <h4>Example image</h4>
        </p>
        <p>
    Include image by using the edXxml macro: </p>
        <p>
          <img src="https://courses.edx.org/static/images/mit_dome.jpg"/>
        </p>
{'fraction_non_alphanumeric': 0.16558249556475457, 'fraction_numerical': 0.0127143701951508, 'mean_word_length': 1.9734065934065934, 'pattern_counts': {'":': 0, '<': 234, '<?xml version=': 2, '>': 234, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 8}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4152967', 'n_tokens_mistral': 4038, 'n_tokens_neox': 3832, 'n_words': 1122}