# This program draws rectangular box figures. # Prints a rectangular box filled with dots. def draw_box(width, height): print("*" * width) for line in range(height - 2): print("*", "." * (width - 2), "*", sep="") print("*" * width) # Prints a "hut" figure with a triangular roof # and rectangular base of the given size. def draw_hut(size): for line in range(1, size): print(" " * (size - line), end="") print("*" * (line * 2 - 1)) draw_box(size * 2 - 1, size) def main(): draw_hut(6) main()