title: Invalid literal for int() with base 10: 'q'
body: <pre><code>   ValueError:invalid literal for int() with base 10: 'q'
  </code></pre>
  
  <p>I'm fairly new to Python (Python3 by the way!) and I'm stumped on this problem. I get why the error is showing (which is because I'm trying to get a string when I'm using integers) but I'm clueless as to how to get around it. I want for my program to read integers in, according to the conditions, and exit when it reads the string 'q'. It might be an easy fix, but I really need another set of eyes on my code. I've been wrestling with this for longer than I'm proud of.</p>
  
  <pre><code>def main():
      aliveRow = []
      aliveCol = []
      rowAlive =''
      colAlive = -1
      row = 5
      column = 5
      while rowAlive != 'q':
          rowAlive = input("Please enter the row of a cell to turn on (or 'q' to exit:) ")
          if rowAlive != 'q' and int(rowAlive) &lt; 0 or int(rowAlive) &gt; row - 1:
              print('that is no a valid value; please enter a number \n \t between 0 and ', row - 1, 'inclusive....')
          elif rowAlive != 'q' and int(rowAlive) &gt;= 0 and int(rowAlive) &lt;= row - 1:
              aliveRow.append(rowAlive)
          else:
              print()
  </code></pre>