标签:coding for utf-8 sys int out imp 图案 每日一题
# coding=utf-8
"""
打印出如下图案(菱形):
*
***
*****
*******
*****
***
*
"""
from sys import stdout
for i in range(4):
for j in range(2 - i + 1):
stdout.write(‘ ‘)
for k in range(2 * i + 1):
stdout.write(‘*‘)
print("")
for i in range(3):
for j in range(i + 1):
stdout.write(‘ ‘)
for k in range(4 - 2 * i + 1):
stdout.write(‘*‘)
print("")
标签:coding for utf-8 sys int out imp 图案 每日一题
原文地址:https://www.cnblogs.com/walxt/p/11565867.html