Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def hg(h, top=0, bot=0):
- print('#'*(2*(h+1)-1))
- for i in range(h):
- if h-i <= top:
- print(' '*i+'#'+'.'*(h-i)+'.'*(h-i-1)+'#'*(h-i>0))
- else:
- print(' '*i+'#'+' '*(h-i)+' '*(h-i-1)+'#'*(h-i>0))
- for i in range(h):
- if h-i <= bot:
- print(' '*(h-i)+'#'+'.'*(i)+'.'*(i-1)+'#'*(i>0))
- else:
- print(' '*(h-i)+'#'+' '*(i)+' '*(i-1)+'#'*(i>0))
- print('#'*(2*(h+1)-1))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement