aiaiask.com©

开花即结果 提问即答案

vs code圣诞树代码
原始问题:

vs code圣诞树代码

def print_tree(height):
    for i in range(height):
        print(" " * (height - i - 1) + "*" * (2 * i + 1))
    print(" " * (height - 1) + "|")

height = int(input("请输入圣诞树的高度: "))
print_tree(height)
vs code圣诞树代码
https://www.aiaiask.com/ask/77063.html
AI / 模型Siliconflow
时间 / DATEDecember 25, 2023, 11:00 AM
语言zh-CN
IP / 区域湖北 荆门