From 1b9c5c9a05ba329ed674757f4590428d7ae9ba94 Mon Sep 17 00:00:00 2001 From: subrhamanya Date: Wed, 16 Oct 2019 17:31:31 +0530 Subject: [PATCH] Simple And Efficient Program To Print Pyramid Pattern --- python-pattern/pyramid_pattern.py | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 python-pattern/pyramid_pattern.py diff --git a/python-pattern/pyramid_pattern.py b/python-pattern/pyramid_pattern.py new file mode 100644 index 0000000..87aeddb --- /dev/null +++ b/python-pattern/pyramid_pattern.py @@ -0,0 +1,11 @@ +# Simple program to print the pyramid pattern in python +# input : +# Enter a number3 +# Output: +# +# * +# * * +# * * * +a = int(input("Enter a number")) +for i in range(1, a+1): + print(" " * (a - i), "* " * i) \ No newline at end of file