要求使用循环
当 n = 1
当 n = 2
当 n = 3
当 n = 4
(Python)打印输出如下图形
当 n = 1
当 n = 2
当 n = 3
当 n = 4
(Python)打印输出如下图形
n=int(input("n = "))
for i in range(1,1+n):
for j in range(i):
print("*",end = '')
for j in range(n-i):
print(' ',end = '')
for j in range(n-i):
print(" ",end = '')
for j in range(i):
print('*',end = '')
print()