From 5d340d30b76bace5fe27d34293480d27d4e590d5 Mon Sep 17 00:00:00 2001 From: Olga Tkach Date: Wed, 19 Oct 2022 15:29:02 -0400 Subject: [PATCH] Added cross pattern --- CROSS/cross.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 CROSS/cross.py diff --git a/CROSS/cross.py b/CROSS/cross.py new file mode 100644 index 0000000..e44ac72 --- /dev/null +++ b/CROSS/cross.py @@ -0,0 +1,12 @@ +# Creating cross pattern of stars + +# Reading number of row +n = int(input('Enter the value of n: ')) + +for i in range(1, 2*n): + for j in range(1, 2*n): + if i == j or i+j == 2*n: + print('*', end='') + else: + print(' ', end='') + print()