title: Trouble with conditional statement
body: <p>I am working on an algorithm, but I'm stuck at the final step. I'm trying to print an additional &quot;column&quot; based on the conditions that I have defined but cant figure out how to do it. So far I have:</p>
  <pre class="lang-py prettyprint-override"><code>running_count = 0
  consecutive_passes = 0
  strikes = 0
  for i in range(len(df)):
    
    if df.FINALS[i] == &quot;PASS&quot;:
      running_count += 1
      consecutive_passes += 1
      if consecutive_passes &gt;= 11 and consecutive_passes &lt;= 17:
        strikes = 2
        print(running_count, df.FINALS[i], consecutive_passes, strikes)
      if consecutive_passes &lt;= 10:
        print(running_count, df.FINALS[i], consecutive_passes, strikes)
    
    if df.FINALS[i] == &quot;FAIL&quot;:
      running_count += 1
      consecutive_passes = 0
      strikes -= 1
      print(running_count, df.FINALS[i], consecutive_passes, strikes)
  </code></pre>
  <pre><code>OUTPUT:
  1 PASS 1 0
  2 PASS 2 0
  3 PASS 3 0
  4 PASS 4 0
  5 PASS 5 0
  6 PASS 6 0
  7 PASS 7 0
  8 PASS 8 0
  9 PASS 9 0
  10 PASS 10 0
  11 PASS 11 2
  12 PASS 12 2
  13 PASS 13 2
  14 PASS 14 2
  15 FAIL 0 1
  16 PASS 1 1
  17 PASS 2 1
  18 PASS 3 1
  19 PASS 4 1
  20 PASS 5 1
  21 PASS 6 1
  22 PASS 7 1
  23 PASS 8 1
  24 FAIL 0 0
  25 PASS 1 0
  26 PASS 2 0
  27 PASS 3 0
  28 PASS 4 0
  29 PASS 5 0
  30 PASS 6 0
  31 PASS 7 0
  32 PASS 8 0
  33 PASS 9 0
  34 PASS 10 0
  35 PASS 11 2
  </code></pre>
  <p>I need the output to look like the following, but I cant quite understand which condition to add to get the output to look the way I need it to.</p>
  <pre><code>1 PASS 1 0 100
  2 PASS 2 0 100
  3 PASS 3 0 100
  4 PASS 4 0 100
  5 PASS 5 0 100
  6 PASS 6 0 100
  7 PASS 7 0 100
  8 PASS 8 0 100
  9 PASS 9 0 100
  10 PASS 10 0 100
  11 PASS 11 2 50
  12 PASS 12 2 50
  13 PASS 13 2 50
  14 PASS 14 2 50
  15 FAIL 0 1 50
  16 PASS 1 1 50
  17 PASS 2 1 50
  18 PASS 3 1 50
  19 PASS 4 1 50
  20 PASS 5 1 50
  21 PASS 6 1 50
  22 PASS 7 1 50
  23 PASS 8 1 50
  24 FAIL 0 0 50
  25 PASS 1 0 100
  26 PASS 2 0 100
  27 PASS 3 0 100
  28 PASS 4 0 100
  29 PASS 5 0 100
  30 PASS 6 0 100
  31 PASS 7 0 100
  32 PASS 8 0 100
  33 PASS 9 0 100
  34 PASS 10 0 100
  35 PASS 11 2 50
  </code></pre>
  <p>The way I was planning on determining the last column was to access it via a python dictionary based on the <code>strikes</code> count and the <code>consecutive count</code>.</p>
  <pre class="lang-py prettyprint-override"><code>rate = {
      100: list(range(1, 11)),
      50: list(range(11, 17)),
      33: list(range(17, 26))
  }
  </code></pre>
  <p>If someone can help that would be great. P.S. I plan to append all of the results to a list and save it to a Pandas <code>DataFrame</code>. Thanks.</p>