From 255584176286bb6c589c02aa232ab8de76d52972 Mon Sep 17 00:00:00 2001 From: Saurabh Gupta Date: Tue, 28 Oct 2025 14:39:02 +0530 Subject: [PATCH] Add program to create a pyramid of stars Program to create a pyramid of stars. --- Pyramid of stars | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 Pyramid of stars diff --git a/Pyramid of stars b/Pyramid of stars new file mode 100644 index 0000000000..0220b87ef8 --- /dev/null +++ b/Pyramid of stars @@ -0,0 +1,13 @@ +# Program to create a pyramid of stars + +rows = int(input("Enter the number of rows: ")) + +for i in range(1, rows + 1): + for spaces in range(1, rows - i + 1): + print(end=' ') + + for stars in range(1, i + 1): + print('*', end=' ') + + print() +