Skip to content

Instantly share code, notes, and snippets.

@nattybear
Created April 5, 2017 04:00
Show Gist options
  • Save nattybear/3309b45b7173d0f9142905a9d862094c to your computer and use it in GitHub Desktop.
Save nattybear/3309b45b7173d0f9142905a9d862094c to your computer and use it in GitHub Desktop.
while True:
num = int(input())
if num < 3 or num % 2 == 0: continue
dot = 1
blank = int(num / 2)
while dot < num:
print(' ' * blank + '*' * dot)
dot += 2
blank -= 1
while dot > 0:
print(' ' * blank + '*' * dot)
dot -= 2
blank += 1
select = int(input())
if select == 0: break
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment