#
以正确的宽度在居中的盒子内打印一个句子
sentence=input("setence:")
screen_width=80
text_width=len(sentence)
box_width=text_width+6
left_margin=(screen_width-box_width)//2
print()
print(' '*left_margin+'+'+'-'*(text_width+2)+ '+')
print(' '*left_margin+'|'+' '*(text_width+2)+
'|')
print(' '*left_margin+'|'+
sentence +' '*(box_width-text_width-4)+'|')
print(' '*left_margin+'|'+' '*(text_width+2)+
'|')
print(' '*left_margin+'+'+'-'*(text_width+2)+ '+')
print()