菱形
# 菱形for i in range(6):
for j in range(5-i):
print(' ',end=' ')
for k in range(2*i+1):
print('*',end=' ')
print()
for i in range(6):
for j in range(i+1):
print(' ',end=' ')
for k in range(11-2*i):
print('*',end=' ')
print()
这段代码需要怎么改才对呢?求助 沙发 for i in range(6):
for j in range(5-i):
print(' ',end=' ')
for k in range(2*i+1):
print('*',end=' ')
print()
for i in range(6):
for j in range(i+1):
print(' ',end=' ')
for k in range(9-2*i):
print('*',end=' ')
print()
第十行11 改成 9
页:
[1]