链接: https://pan.baidu.com/s/1eUar0um 密码: vkqi
#
# #
# #
# # # #
i = 1
while i < 10:
j = 1
while j < 10:
if i < 9:
if j == 1 or j == i:
print("*", end=' ')
else:
print(" ", end=' ')
else:
print("*", end=' ')
j += 1
print("")
i += 1
#
# #
# #
# # # #
i = 1
while i < 10:
j = 1
while j < 10:
if i < 9:
if j == 9 or j + i == 10:
print("*", end=' ')
else:
print(" ", end=' ')
else:
print("*", end=' ')
j += 1
print("")
i += 1
#
# #
# # # # #
i = 1
while i <= 10:
j = 1
while j < 20:
if i < 10:
if j + i == 11 or j == 9 + i:
print("*", end=' ')
else:
print(" ", end=' ')
else:
print("*", end=' ')
j += 1
print("")
i += 1
#
# # #
# # # # #
i = 1
while i <= 10:
j = 1
while j < 20:
if j + i >= 11 and j <= 9 + i or i == 10:
print("*", end=' ')
else:
print(" ", end=' ')
j += 1
print("")
i += 1
i = 0
# 10 row
while i < 10:
j = 1
# 19 col
while j < 20:
mid = 19 // 2 + 1
#print(mid)
if j == mid - i or j == mid + i or i == 9:
print("*", end=' ')
else:
print(" ", end=' ')
j += 1
print("")
i += 1
i = 0
# 10 row
while i < 10:
j = 1
# 19 col
while j < 20:
mid = 19 // 2 + 1
#print(mid)
if j >= mid - i and j <= mid + i or i == 9:
print("*", end=' ')
else:
print(" ", end=' ')
j += 1
print("")
i += 1
i = 0
# 10 row
while i < 10:
j = 1
# 19 col
while j < 20:
#mid = 19 // 2 + 1
#print(mid)
if j > i and j <= 19 - i or i == 0:
print("*", end=' ')
else:
print(" ", end=' ')
j += 1
print("")
i += 1