language: Python (python 2.7.3)
date: 815 days 17 hours ago
link:
visibility: private
1
2
3
4
5
6
7
8
9
10
11
def diamond(stars, spaces = 1):
    if stars == 0:
        print ' ' * spaces
    else:
        border = '*' * stars + ' ' * spaces + '*' * stars
 
        print border
        diamond(stars - 1, spaces + 2)
        print border
 
diamond(5)