title: Python TypeError: not all arguments converted during string formatting
body: <p>I am an absolute beginner of python. I had coded a program for checking whether a number is prime or not. but it is giving me the above type error</p>
  
  <p>What is the meaning of that error and how should I resolve it?</p>
  
  <p>I saw the questions with same title. but I didn't understand how to resolve it. so I am asking this question. </p>
  
  <pre class="lang-python prettyprint-override"><code>num = ( "which no. u want to check prime or not:" )
  i = 1
  k = 0
  while(i &lt;= num):
    if(num % i == 0): #idle is showing type error here 
         k=k+1
         i=i+1
    if(k == 2):
         print "%d is prime number" % num
    else:
         print "%d is not a prime no" % num
  </code></pre>