diff options
Diffstat (limited to 'python/code/2/7.py')
-rw-r--r-- | python/code/2/7.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/python/code/2/7.py b/python/code/2/7.py new file mode 100644 index 0000000..3212851 --- /dev/null +++ b/python/code/2/7.py @@ -0,0 +1,9 @@ +size = int(input('Enter pattern size: ')) +if size < 0: + print('Invalid size') +else: + print('*' * size) + for i in range(size - 2): + print('*' + ' ' * (size - 2) + '*') + if size > 1: + print('*' * size) |