Why do I get this TypeError?
<p>I believe this error means I can't include a variable in a loop however I am struggling to see a way around....</p>

<p>the error is </p>

<pre><code>TypeError: range() integer end argument expected, got unicode.
</code></pre>

<p>The problem the book tried to ask me is: </p>

<blockquote>
  <p>Try wring a program the will prompt for an number and print the correct times table (up to 12).</p>
</blockquote>

<p>This is my code:</p>

<pre><code>def main():
    pass    
choice = raw_input("Which times table would you like")    
print ("This is the", choice , "'s times table to 12")    

var1 = choice*12 + 1

for loopCounter in range (0,var1,choice):
    print(loopCounter)    

if __name__ == '__main__':
    main()
</code></pre>

<p>Any suggestions? thanks in advance.</p>

<p>This error just means that it got a unicode value when an integer was assumed. 
That happens because you use <code>raw_input</code> for <code>choice</code>.</p>

<p>Edit: <code>raw_input</code> does not interpret your input. <code>input</code> does. </p>

python python-2.7