Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I have fixed up some typoes, avoided the scroll bar, shown the contents of <code>section</code> and <code>section2</code>, and added a print statement:</p> <pre><code>table = [ [0, 8, 4, 0, 7], [3, 6, 0, 9, 0], [4, 0, 3, 7, 0], [7, 0, 7, 0, 6] ] section1 = [table[0][0], table[0][1], table[1][0], table[1][1]] print "section1:", section1 section2 = [table[3][4], table[2][4], table[3][3], table[2][3]] print "section2:", section2 def mystery(query_value, sections, some_integers_whose_purport_is_unknown): return "Not a clue" qv = 0 for row_index, row in enumerate(table): if qv in row: # if 1, 2, and 3 are in X # where X = whichever "section"(section1 or section2) the 0 is in a_boolean = mystery(qv, (section1, section2), (1, 2, 3)) print "row_index: %r, condition_value: %r" % (row_index, a_boolean) </code></pre> <p>Output:</p> <pre><code>section1: [0, 8, 3, 6] section2: [6, 0, 0, 7] row_index: 0, condition_value: 'Not a clue' row_index: 1, condition_value: 'Not a clue' row_index: 2, condition_value: 'Not a clue' row_index: 3, condition_value: 'Not a clue' </code></pre> <p>You need to explain what those condition_values are, and how they are derived. Including: </p> <p>(1) what <code>X = whichever "section"(section1 or section2) the 0 is in</code> means ... noting that <code>0</code> appears in BOTH <code>section1</code> and <code>section2</code></p> <p>(2) what <code>1, 2, and 3 are in X</code> means: perhaps <code>1 in X and 2 in X and 3 in X</code>, but that would be <code>False</code> for all cases (no 1, no 2, only one 3 in either of the sections).</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload