Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from operator import add, sub
- def govno_code(a):
- t = 1
- c = 0
- oper = add
- a += 2
- while t != a:
- c = oper(c, 1)
- if c == 1 or c == t:
- if c == t:
- oper = sub
- if c == 1:
- if t != 1:
- print c,
- oper = add
- print "\n",
- t += 1
- if t != a:
- print c,
- if __name__ == "__main__":
- govno_code(10)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement