Q:

Star pattern : 8، write python program to print the following pattern

0

Star pattern 8

    *
   ***
  *****
 *******
*********
 *******
  *****
   ***
    *

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

n=5;
for i in range(0,n+1):
    for j in range(0,n-i):
        print(end=" ")
    for j in range(0,i):
        print("*",end=" ")
    print()
if i==n:
    for i in range(n-1,0,-1):
        for j in range(0,n-i):
            print(end=" ")
        for j in range(0,i):
            print("*",end=" ")
        print()

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Star pattern : 9، write python program to print t... >>
<< Star pattern : 7، write python program to print t...