Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- n = int(input())
- star = 1
- length = n
- mid_dash = 1
- if n % 2 == 0:
- star += 1
- mid_dash += 1
- dash = length - star
- dash_left_right = int(dash / 2)
- print("-" * dash_left_right + "*" * star + "-" * dash_left_right)
- high = int((n - 1) / 2)
- out_dash = length - mid_dash - 2
- for i in range(1, high + 1):
- out_dash_left_right = int(out_dash / 2)
- print("-" * out_dash_left_right + "*" + "-" * mid_dash + "*" + "-" * out_dash_left_right)
- mid_dash += 2
- out_dash -= 2
- floor_dash = 2
- floor_middle_dash = length - floor_dash - 2
- for j in range(1, high):
- floor_dash_left_right = int(floor_dash / 2)
- print("-" * floor_dash_left_right + "*" + "-" * floor_middle_dash + "*" + "-" * floor_dash_left_right)
- floor_dash += 2
- floor_middle_dash -= 2
- if n == 1 or n == 2:
- pass
- else:
- print("-" * dash_left_right + "*" * star + "-" * dash_left_right)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement