From 8fb719f58f91d1f1f187a1db974682fb3736ee05 Mon Sep 17 00:00:00 2001 From: Sudipto Mallick Date: Sat, 13 Jan 2024 09:28:10 +0530 Subject: Changes to project structure of Python assignments As was directed to remove assignments. --- python/code/07_hstarpat.py | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 python/code/07_hstarpat.py (limited to 'python/code/07_hstarpat.py') diff --git a/python/code/07_hstarpat.py b/python/code/07_hstarpat.py new file mode 100644 index 0000000..3212851 --- /dev/null +++ b/python/code/07_hstarpat.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) -- cgit 1.4.1-2-gfad0