#Python3打印矩形框图案

Python3中打印矩形框图案

# 打印如下图形
'''
*********
*       *
*       *
*********
'''

for i in range(4):
    for j in range(9):
        if i == 0 or i == 3 or j == 0 or j == 8:
            print('*', end='')
        else:
            print(' ', end='')
    print()

猜你喜欢

转载自blog.csdn.net/weixin_43097301/article/details/83025278