title: Recursively print diamond in python
body: <p>Can anyone help me out here, I am stuck on the base cases for turning this code into a recursive function... Can't use loops in the recursive function obviously. </p>
  
  <pre><code>def diamond(a):
  
  assert a &gt; 0, "width must be greater than zero"
  
  
  for i in range(0, a, 2):
  
      for c in range(0, a - i, 2):
          print(" ", end='')
  
      if a % 2 == 0:
          i += 1
  
      for m in range(0, i - 1):
          print("*", end='')
  
      print()
  
  
  for i in range (0, a, 2):
  
      for c in range(0, i, 2):
          print(" ", end='')
  
      for m in range(0, a - i):
          print("*", end='')
  
      print()
  </code></pre>