Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- a = 1
- x = 0
- stack = []
- while a <= 29:
- i = 5 - x
- temp = i
- if i%2 == 0:
- while i > 0:
- stack.append(a)
- a += 2
- i -= 1
- while i < temp:
- print(stack.pop(), end = ' ')
- i += 1
- print()
- x += 1
- else:
- while i > 0:
- print(a, end=' ')
- i -= 1
- a += 2
- print()
- x += 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement