# coding = utf-8
# 正方形
height = int(input("请您输入要打印的正方形的边长:"))
for _ in range(0, height):
for _ in range(0, height):
print("■ ", end='')
print()
triangleHeight = int(input("请输入您要打印的正直角三角形的行高(正整数):"))
# 正直角三角形
for i in range(0, triangleHeight):
for j in range(0, i + 1):
print
打印图形
最新推荐文章于 2021-04-02 21:45:55 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)