From 96d6bb34e011f24751bfb5b6d7507ce3709457ed Mon Sep 17 00:00:00 2001 From: "M.V.S.Sai Hiranmayee" <62197337+hiranmayee1123@users.noreply.github.com> Date: Fri, 14 Oct 2022 21:31:13 +0530 Subject: [PATCH] Create Reversed pyramid pattern of stars --- Python/Reversed pyramid pattern of stars | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 Python/Reversed pyramid pattern of stars diff --git a/Python/Reversed pyramid pattern of stars b/Python/Reversed pyramid pattern of stars new file mode 100644 index 0000000..94fbdb9 --- /dev/null +++ b/Python/Reversed pyramid pattern of stars @@ -0,0 +1,9 @@ +rows = 5 +k = 2 * rows - 2 +for i in range(rows, -1, -1): + for j in range(k, 0, -1): + print(end=" ") + k = k + 1 + for j in range(0, i + 1): + print("*", end=" ") + print("")