Popular recipes tagged "drawing" but not "graphics"http://code.activestate.com/recipes/tags/drawing-graphics/2014-11-07T17:51:32-08:00ActiveState Code RecipesDraw a diamond with asterisks using recursion (Python)
2014-11-07T17:51:32-08:00Stephen Chappellhttp://code.activestate.com/recipes/users/2608421/http://code.activestate.com/recipes/578959-draw-a-diamond-with-asterisks-using-recursion/
<p style="color: grey">
Python
recipe 578959
by <a href="/recipes/users/2608421/">Stephen Chappell</a>
(<a href="/recipes/tags/drawing/">drawing</a>).
</p>
<p>Given the following function header:</p>
<pre class="prettyprint"><code>def triangles(n):
</code></pre>
<p>If n for example is 5, then the drawing would be like this:</p>
<pre class="prettyprint"><code> *
* * *
* * * * *
* * *
*
</code></pre>