#打印出如下图案(菱形)
rows = int(input('Input a number: '))
s = '*'
for i in range(1, rows + 1, 2):
print((s * i).center(rows))
#打印出如下图案(菱形)
rows = int(input('Input a number: '))
s = '*'
for i in range(1, rows + 1, 2):
print((s * i).center(rows))