2020
11-29
11-29
使用Python画了一棵圣诞树的实例代码
分享给大家一篇文章,教你怎样用Python画了一棵圣诞树,快来学习。如何用Python画一个圣诞树呢?最简单:height=5stars=1foriinrange(height):print((''*(height-i))+('*'*stars))stars+=2print((''*height)+'|')效果:哈哈哈哈,总有一种骗了大家的感觉。其实本文是想介绍Turtle库来画圣诞树。importturtlescreen=turtle.Screen()screen.setup(375,700)circle=turtle.Tur...
继续阅读 >