title: print row prime number in recursion def python
body: <p>Hi guys can u help i want to make number list prime in python but with no for loop do or while in inside or outside only with recursive function</p>
  <p>this is mycode with def recursion, can u guys help me change to print 2-limit in def recursive ?</p>
  <pre><code>def is_prime(n, div=2):
  
  if div&gt; n/2.0: return True
  
  if n% div == 0:
      return False
  else:
      div+=1
      return is_prime(n,div)
  </code></pre>
  <p>but this will need for outside def to print all number 2-100</p>
  <pre><code>#The program:
  for i in range(2,100,1):
  if is_prime(i):
      print(i)
  </code></pre>
  <p>how to change the for in outside def, with just</p>
  <pre><code>limit = int(input(&quot;input limit prime = )
  print(is_prime(limit,2)
  </code></pre>
  <p>what i mean is, how to print 2-limit with recursion in def without loop for,while outside def. im confuse how to make recursive function from it
  Thanks</p>