Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- '''
- After Drawing this calculations:
- lvl draw fx
- 0 1 1 + (2*lvl) 0 = 1
- 1 3 1 + (2*lvl) 2 + 1 = 3
- 2 5 1 + (2*lvl) 4 + 1 = 5
- 3 CENTER "CENTER"
- 4 5 max_draw - (((lvl-center) - 1) * 2 )
- 5 3 max_draw - (((lvl-center) - 1) * 2 )
- 6 1 max_draw - (((lvl-center) - 1) * 2 )
- max_lvl = 7
- widht = 21
- center = (max_lvl-1)/2 = 3
- max_draw = max_lvl - 2
- '''
- height, widht = list(map(int, input().split()))
- # Some calculations
- middle_line = int((height-1)/2)
- max_draw = height - 2 # I dont really know if its a rule xD
- pattern = ".|."
- # Drawing:
- for lvl in range(height):
- # Before center:
- if lvl < middle_line:
- items = 1+(2 * lvl)
- print(f'{items*pattern}'.center(widht,"-"))
- elif lvl == middle_line:
- print("WELCOME".center(widht,"-"))
- elif lvl > middle_line:
- items = max_draw - (((lvl-middle_line) - 1) * 2 )
- print(f'{items*pattern}'.center(widht,"-"))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement