diff --git a/examples/from_liyan/systemstarpyramid.py b/examples/from_liyan/systemstarpyramid.py new file mode 100644 index 00000000..dd4595b5 --- /dev/null +++ b/examples/from_liyan/systemstarpyramid.py @@ -0,0 +1,10 @@ +# Pyramid Pattern Generator +#hi + +rows = int(input("Enter number of rows: ")) + +for i in range(1, rows + 1): + + spaces = " " * (rows - i) + stars = "*" * (2 * i - 1) + print(spaces + stars)