Guest User

Untitled

a guest
May 31st, 2010
293
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. from operator import add, sub
  2. def govno_code(a):
  3.     t = 1
  4.     c = 0
  5.     oper = add
  6.     a += 2
  7.     while t != a:
  8.         c = oper(c, 1)
  9.         if c == 1 or c == t:
  10.             if c == t:
  11.                 oper = sub
  12.  
  13.             if c == 1:
  14.                 if t != 1:
  15.                     print c,
  16.                 oper = add
  17.            
  18.             print "\n",
  19.             t += 1
  20.            
  21.         if t != a:
  22.             print c,
  23.        
  24.        
  25. if __name__ == "__main__":
  26.     govno_code(10)
RAW Paste Data