I got this Error: No grader has been set up for this problem

171 views
Skip to first unread message

Jennifer Vidanes

unread,
Apr 29, 2015, 8:48:45 PM4/29/15
to edx-...@googlegroups.com
This is the problem that i have wrote in the blank advance problem in edX:

<problem title="Embedded Code Box" display_name="" graceperiod="0 day 5 hours 0 minutes 0 seconds" markdown="null" rerandomize="never" showanswer="always" start="2013-02-05T00:00" xqa_key="qaijS3UatK020Wc0sfCtFe0V6jpB4d64">
  <text>
    <p> We are searching for
      the smallest monthly payment such that we can pay off the
      entire balance of a loan within a year.</p>
    <p> The following values might be useful when writing your solution</p>
    <blockquote>
      <p><strong>Monthly interest rate</strong>
= (Annual interest rate) / 12<br/>
<strong>Monthly payment lower bound</strong>
= Balance / 12<br/>

<strong>Monthly payment upper bound</strong> = (Balance x
        (1 + Monthly interest rate)<sup>12</sup>) / 12
</p>
    </blockquote>
    <p>The following variables contain values as described below:</p>
    <ol>
      <li>
        <p><code>balance</code> - the outstanding balance on the credit card</p>
      </li>
      <li>
        <p><code>annualInterestRate</code> - annual interest rate as a decimal</p>
      </li>
    </ol>
    <p>Write a program that uses these bounds and bisection
        search (for more info check out <a href="http://en.wikipedia.org/wiki/Bisection_method" target="_blank">the Wikipedia page
        on bisection search</a>)
        to find the smallest monthly payment <em>to the cent</em>
        such that we can pay off the
        debt within a year.</p>
    <p>Note that if you do not use bisection search, your code will not run - your code only has
      30 seconds to run on our servers. If you get a message that states "Your submission could not be graded. Please recheck your
      submission and try again. If the problem persists, please notify the course staff.", check to be
      sure your code doesn't take too long to run.</p>
    <p>The code you paste into the following box should not specify the values for the variables <code>balance</code>
      or <code>annualInterestRate</code> - our test code will define those values
      before testing your submission. </p>
  </text>
  <coderesponse>
    <textbox rows="10" cols="70" mode="python" tabsize="4"/>
    <codeparam>
      <initial_display/>
      <answer_display>
monthlyInterestRate = annualInterestRate/12
lowerBound = balance/12
upperBound = (balance * (1+annualInterestRate/12)**12)/12
originalBalance = balance

# Keep testing new payment values
#  until the balance is +/- $0.02
while abs(balance) &gt; .02:
    # Reset the value of balance to its original value
    balance = originalBalance
    # Calculate a new monthly payment value from the bounds
    payment = (upperBound - lowerBound)/2 + lowerBound

    # Test if this payment value is sufficient to pay off the
    #  entire balance in 12 months
    for month in range(12):
        balance -= payment
        balance *= 1+monthlyInterestRate

    # Reset bounds based on the final value of balance
    if balance &gt; 0:
        # If the balance is too big, need higher payment
    #  so we increase the lower bound
        lowerBound = payment
    else:
        # If the balance is too small, we need a lower
    #  payment, so we decrease the upper bound
        upperBound = payment

# When the while loop terminates, we know we have
#  our answer!
print "Lowest Payment:", round(payment, 2)
</answer_display>
      <grader_payload>
{"grader": "ps02/bisect/grade_bisect.py"}
</grader_payload>
    </codeparam>
  </coderesponse>
  <text>
    <div>
      <b>Note:</b>
      <p>Depending on where, and how frequently, you round during
        this function, your answers may be off a few cents in
        either direction. Try rounding as few times as possible
        in order to increase the accuracy of your result. </p>
    </div>
    <section class="hints">
      <h3>Hints</h3>
      <div class="collapsible">
        <header>
          <a href="#" id="ht3l">Test Cases to test your code with. Be sure to test these on your own machine -
    and that you get the same output! - before running your code on this webpage! </a>
        </header>
        <section id="ht3">
          <p><b>Note:</b> The automated tests are lenient - if your answers are off by a few cents
    in either direction, your code is OK. </p>
          <p>Test Cases:</p>
          <ol>
            <li>
              <p>
                <pre>
                  <code>
          Test Case 1:
          balance = 320000
          annualInterestRate = 0.2

          Result Your Code Should Generate:
          -------------------
          Lowest Payment: 29157.09
      </code>
                </pre>
              </p>
            </li>
            <li>
              <p>
                <pre>
                  <code>
          Test Case 2:
          balance = 999999
          annualInterestRate = 0.18
         
          Result Your Code Should Generate:
          -------------------
          Lowest Payment: 90325.07
      </code>
                </pre>
              </p>
            </li>
          </ol>
        </section>
      </div>
      <div class="collapsible">
        <header>
          <a href="#" id="ht4">The autograder says, "Your submission could not be graded." Help!</a>
        </header>
        <section id="ht4">
          <p> If the autograder gives you the following message:</p>
          <pre>
Your submission could not be graded.
Please recheck your submission and try again. If the problem persists, please notify the course staff.
      </pre>
          <p>Don't panic! There are a few things that might be wrong with your code that you should
        check out. The number one reason this message appears is because your code timed out.
        You only get 30 seconds of computation time on our servers. If your code times out,
        you probably have an infinite loop. What to do?</p>
          <p>The number 1 thing to do is that you need to run this code in your own local
        environment. Your code should print one line at the end of the loop. If your code never https://openedx.atlassian.net/browse/TNL-1773prints anything
        out - you have an infinite loop!</p>
          <p>To debug your infinite loop - check your loop conditional. When will it stop?
        Try inserting print statements inside your loop that prints out information (like variables) - are you
        incrementing or decrementing your loop counter correctly?
        Search the forum for people with similar issues. If your search turns up nothing,
        make a new post and paste in your loop conditional for others to help you out with.</p>
          <p>Please don't email the course staff unless your code legitimately works and prints out the
        correct answers in your local environment. In that case, please email your code file,
        a screenshot of the code printing out the correct answers in your local environment,
        and a screenshot of the exact same code not working on the tutor. The course staff is
        otherwise unable to help debug your problem set via email - we can only address platform issues.</p>
        </section>
      </div>
    </section>
    <br/>
  </text>
</problem>

everytime students tried to answer it, then check..
This error occurs:
Error: No grader has been set up for this problem

Sarina Canelake

unread,
May 5, 2015, 2:11:01 PM5/5/15
to edx-code
Hi Jennifer,

To use the 6.00x graders, you need to have XQueue set up. This is not set up by default, and I'm not sure how to do it or if we provide documentation on it.

This is probably a better question for the openedx-ops mailing list, if you need to have these types of XQueue graders enabled on your system. However if you don't need these types of graders, you can ignore this issue and just not use this type of problem.


Sarina

--
You received this message because you are subscribed to the Google Groups "General Open edX discussion" group.
To view this discussion on the web visit https://groups.google.com/d/msgid/edx-code/e94099a9-da77-4c6b-bb29-9adc26646fd9%40googlegroups.com.

Chris Chapman

unread,
Mar 7, 2017, 11:07:22 AM3/7/17
to General Open edX discussion
Hi Jennifer,

This is quite a bit of time after your posting, but for anyone else encountering this:

I had this problem because I was trying to test it out in the Studio editor. However, it can only be tested in a live course. See the note at: http://edx.readthedocs.io/projects/edx-partner-course-staff/en/latest/exercises_tools/external_graders.html#external-grader-example

To validate your external grader and test a problem, you must view the component in the LMS, in a published unit. If you attempt to test a problem in Studio, the message “Error: No grader has been set up for this problem” displays.
Reply all
Reply to author
Forward
0 new messages