SHARE
TWEET

Untitled

a guest Aug 14th, 2019 51 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import sys
  2. n = 10
  3. space = n-1
  4. for i in range(n):
  5.   for j in range(space+1):
  6.     sys.stdout.write(" ")
  7.   for k in range(i):
  8.     sys.stdout.write("* ")
  9.   space -= 1
  10.   sys.stdout.write("\n")
  11. space = 0
  12. for i in range(n,0,-1):
  13.   for j in range(space):
  14.     sys.stdout.write(" ")
  15.   for k in range(i):
  16.     sys.stdout.write("* ")
  17.   space += 1
  18.   sys.stdout.write("\n")
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top