分享给大家一篇文章,教你怎样用Python画了一棵圣诞树,快来学习。

如何用Python画一个圣诞树呢?
最简单:
height = 5
"text-align: center">
哈哈哈哈,总有一种骗了大家的感觉。
其实本文是想介绍Turtle库来画圣诞树。
import turtle
"text-align: center">
方法二:
import turtle
""" 设置绘图速度
'fastest' : 0
'fast' : 10
'normal' : 6
'slow' : 3
'slowest' : 1
"""
turtle.speed('fastest') # 设置速度
"orange", "yellow")
turtle.left(126)
"dark green")
turtle.backward(n * 4.8)
"text-align: center">