Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from math import ceil, floor
- n = int(input())
- length = n
- dash = n - 1
- stars_base = n - 2
- high_roof = ceil(n / 2)
- high_base = floor(n / 2)
- stars_roof = 1
- if n % 2 == 0:
- stars_roof += 1
- dash = n - 2
- for x in range(1, high_roof + 1):
- dash_left_right = dash // 2
- print("-" * dash_left_right + "*" * stars_roof + "-" * dash_left_right)
- dash -= 2
- stars_roof += 2
- for y in range(1, high_base + 1):
- print("|" + "*" * stars_base + "|")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement