Python Star Pattern 11

Last Updated:

Python Star Pattern 11

Try to print the following star pattern using Python.

Print This Output
**********
****  ****
***    ***
**      **
*        *
**      **
***    ***
****  ****
**********

Source Code

Python Compiler
for i in range(5, 0, -1): for j in range(i, 0, -1): print("*",end="") for k in range(i, 5): print(" ",end="") for m in range(i, 5, 1): print(" ",end="") for n in range(0, i): print("*",end="") print() for i in range(1, 5): for j in range(0, i+1): print("*",end="") for k in range(i, 4): print(" ",end="") for m in range(i, 4): print(" ",end="") for n in range(-1, i): print("*",end="") print()

Share this Page

Meet the Author