Created
April 5, 2017 03:24
-
-
Save nattybear/caa4338c9ff7a47ed161e25295f20a40 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| while True: | |
| num = int(input()) | |
| if (num < 3) or (num % 2 == 0): continue | |
| space = int(num / 2) | |
| for i in range(1, num, 2): | |
| print(' ' * space + '*' * i) | |
| space -= 1 | |
| print('*' * num) | |
| for i in range(num-2, 0, -2): | |
| space += 1 | |
| print(' ' * space + '*' * i) | |
| 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