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() +