intresting pattern
def StarPattern(height):
for i in range(height):
for j in range(height-1,i,-1):
print("*",end="")
printChar = False
for j in range(((i*2) +1)):
if ( printChar ):
print("*",end="")
else:
print(i + 1,end="")
printChar = not printChar
for j in range(height-1,i,-1):
print("*",end="")
print()
height = 21
StarPattern(height)
|
run
| edit
| history
| help
|
0
|
|
|