Solutions
Last updated
Was this helpful?
Last updated
Was this helpful?
Was this helpful?
*
***
*****
*
* *
***
*****
*******
*********
*
*def draw_arrow(n):
for i in range(n):
#number of stars:
stars = (i*2 +1) * "*" # 1, 3, 5, 7, ...
#number of spaces
spaces = ((n-i) - 1) * " " # n-1, n-2, n-3, ...
#print row
print(spaces+stars)
#print shaft
shaft_spaces = (n-1) * " "
print(shaft_spaces+"*")
print(shaft_spaces+"*")