I am trying to use this to print a Python snippet:
def print_box_with_rounded_corners(width, height):
if width < 3 or height < 3:
print("Width and height should be at least 3 to draw rounded corners.")
return
# Top rounded corners and top border
print('╭' + '─' * (width - 2) + '╮')
# Middle part
for _ in range(height - 2):
print('│' + ' ' * (width - 2) + '│')
# Bottom rounded corners and bottom border
print('╰' + '─' * (width - 2) + '╯')
# Set the dimensions of the box
box_width = 10
box_height = 5
# Print the box
print_box_with_rounded_corners(box_width, box_height)
Hi,
I am trying to use this to print a Python snippet:
However, it gave out:
Could you help take a look?