brewersfan1976

Triangular2.py

Jul 3rd, 2015
245
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.32 KB | None | 0 0
  1. # prints two triangles side by side
  2.  
  3. value_1 = 1
  4. value_2 = 7
  5. line = 1
  6. x = 1
  7. y = 1
  8.  
  9. while (line <= 8):
  10.    while (x <= value_1):
  11.         print "*",
  12.         x = x + 1
  13.    
  14.    while (y <= value_2):
  15.         print "#",
  16.         y = y + 1
  17.    
  18.    print
  19.    value_1 = value_1 + 1
  20.    value_2 = value_2 - 1
  21.    line = line + 1
  22.    x = 1
  23.    y = 1
Advertisement
Add Comment
Please, Sign In to add comment