小象学院 零基础Python入门 案例二 分形树绘制1.0

在这里插入图片描述

在这里插入图片描述

import turtle

def main():
count = 1
while count<=5:
turtle.forward(200)
turtle.right(144)
count = count + 1
turtle.exitonclick()

if name == ‘main’:
main()

【课后练习】
x=y=z=1 赋值正确
x,y=y,x x和y互相交换
x+=y 相当于令x=x+y

猜你喜欢

转载自blog.csdn.net/singer97/article/details/83113529
今日推荐