From 68b6fcf3422403ed5b4ac3e450bb7fd9437ccdfa Mon Sep 17 00:00:00 2001 From: wajeehacom Date: Thu, 26 Feb 2026 12:19:12 +0500 Subject: [PATCH] Printing Pyramid Patterns in Python --- Patterns.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 Patterns.py diff --git a/Patterns.py b/Patterns.py new file mode 100644 index 0000000..2e7db0b --- /dev/null +++ b/Patterns.py @@ -0,0 +1,13 @@ +# Function to print full pyramid pattern +def full_pyramid(n): + for i in range(1, n + 1): + # Print leading spaces + for j in range(n - i): + print(" ", end="") + + # Print asterisks for the current row + for k in range(1, 2*i): + print("*", end="") + print() + +full_pyramid(5) \ No newline at end of file